Add API for resolver

This commit is contained in:
Tom 2023-06-29 10:05:29 +02:00
parent 4f4fa2b3d7
commit 3ef9c23a0c
7 changed files with 98 additions and 7 deletions

View file

@ -32,6 +32,6 @@ func (*ListNewsScope) Scope() component.ScopeInfo {
}
func (lns *ListNewsScope) HasScope(param string, r *http.Request) (bool, error) {
// TODO: at the moment everyone has this permission
return true, nil
_, user, err := lns.Dependencies.Auth.SessionOf(r)
return user != nil, err
}