fix authorizations
This commit is contained in:
parent
046d0f1fe5
commit
1c47128b2d
1 changed files with 12 additions and 3 deletions
|
@ -98,11 +98,20 @@ scopeToStr :: Scope -> Text
|
|||
scopeToStr (Scope res acc) = res <> case acc of Read -> ":read"; Write -> ":write"
|
||||
|
||||
readOnlyScopes :: [Text]
|
||||
readOnlyScopes = [ "comment:read", "slug:read" ]
|
||||
readOnlyScopes = [ "comment:read"
|
||||
, "slug:read" ]
|
||||
|
||||
commentGrantedScopes :: [Text]
|
||||
commentGrantedScopes = [ "comment:read", "slug:read" ]
|
||||
commentGrantedScopes = [ "comment:read"
|
||||
, "comment:write"
|
||||
, "slug:read" ]
|
||||
|
||||
allScopes :: [Text]
|
||||
allScopes = [ "admin", "comment:read", "comment:write", "slug:read", "slug:write" ]
|
||||
allScopes = [ "admin"
|
||||
, "comment:read"
|
||||
, "comment:write"
|
||||
, "slug:read"
|
||||
, "slug:write" ]
|
||||
|
||||
userScopes' :: AuthorizationStrategy -> Maybe User -> Scopes
|
||||
userScopes' Anybody Nothing =
|
||||
|
|
Loading…
Reference in a new issue