Implement scopes
This commit is contained in:
parent
be07ac5d83
commit
064ae2f564
15 changed files with 232 additions and 137 deletions
|
|
@ -101,7 +101,8 @@ func (resolver *Resolver) HandleRoute(ctx context.Context, route string) (http.H
|
|||
ctx := resolverContext{
|
||||
IndexContext: context,
|
||||
}
|
||||
if !resolver.Dependencies.Auth.Has(auth.User, r) {
|
||||
|
||||
if resolver.Dependencies.Auth.CheckScope("", component.ScopeUserLoggedIn, r) != nil {
|
||||
ctx.IndexContext.Prefixes = nil
|
||||
}
|
||||
httpx.WriteHTML(tpl.Context(r, ctx), nil, t, "", w, r)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue