Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data AccessCheck
- data AccessResult
- = Allow
- | Deny ServerError
- data AccessPolicyManager = AccessPolicyManager {}
- data PolicyChecked a
- data BoolExpr a
- nodeDescendant :: NodeId -> BoolExpr AccessCheck
- nodeSuper :: NodeId -> BoolExpr AccessCheck
- nodeUser :: NodeId -> BoolExpr AccessCheck
- nodeChecks :: NodeId -> BoolExpr AccessCheck
- userMe :: UserId -> BoolExpr AccessCheck
- alwaysAllow :: BoolExpr AccessCheck
- alwaysDeny :: BoolExpr AccessCheck
Documentation
data AccessCheck #
A type representing all the possible access checks we might want to perform on a resource,
typically a Node
.
AC_node_descendant !NodeId | Grants access if the input |
AC_node_shared !NodeId | Grants access if the input |
AC_user_node !NodeId | Grants access if the input |
AC_user !UserId | Grants access if the logged-in user is the user. |
AC_master_user !NodeId | Grants access if the logged-in user is the master user. |
AC_always_allow | Always grant access, effectively a public route. |
AC_always_deny | Always denies access. |
Instances
Show AccessCheck # | |
Defined in Gargantext.API.Auth.PolicyCheck showsPrec :: Int -> AccessCheck -> ShowS # show :: AccessCheck -> String # showList :: [AccessCheck] -> ShowS # | |
Eq AccessCheck # | |
Defined in Gargantext.API.Auth.PolicyCheck (==) :: AccessCheck -> AccessCheck -> Bool # (/=) :: AccessCheck -> AccessCheck -> Bool # |
data AccessResult #
The result of an access check.
Allow | Grants access. |
Deny ServerError | Denies access with the given |
Instances
Monoid AccessResult # | |
Defined in Gargantext.API.Auth.PolicyCheck mempty :: AccessResult # mappend :: AccessResult -> AccessResult -> AccessResult # mconcat :: [AccessResult] -> AccessResult # | |
Semigroup AccessResult # | |
Defined in Gargantext.API.Auth.PolicyCheck (<>) :: AccessResult -> AccessResult -> AccessResult # sconcat :: NonEmpty AccessResult -> AccessResult # stimes :: Integral b => b -> AccessResult -> AccessResult # |
data AccessPolicyManager #
An access policy manager for gargantext that governs how resources are accessed and who is entitled to see what.
Instances
AddSetCookies ('S n) old new => AddSetCookies ('S n) (AccessPolicyManager -> old) new # | |
Defined in Gargantext.API.Auth.PolicyCheck addSetCookies :: SetCookieList ('S n) -> (AccessPolicyManager -> old) -> new # |
data PolicyChecked a #
Phantom type that allows us to embellish a Servant route with a policy check.
Instances
Syntax of boolean expressions parameterized over a set of leaves, named constants.
BAnd (BoolExpr a) (BoolExpr a) | |
BOr (BoolExpr a) (BoolExpr a) | |
BNot (BoolExpr a) | |
BTrue | |
BFalse | |
BConst (Signed a) |
Instances
Foldable BoolExpr | |
Defined in Data.BoolExpr fold :: Monoid m => BoolExpr m -> m # foldMap :: Monoid m => (a -> m) -> BoolExpr a -> m # foldMap' :: Monoid m => (a -> m) -> BoolExpr a -> m # foldr :: (a -> b -> b) -> b -> BoolExpr a -> b # foldr' :: (a -> b -> b) -> b -> BoolExpr a -> b # foldl :: (b -> a -> b) -> b -> BoolExpr a -> b # foldl' :: (b -> a -> b) -> b -> BoolExpr a -> b # foldr1 :: (a -> a -> a) -> BoolExpr a -> a # foldl1 :: (a -> a -> a) -> BoolExpr a -> a # elem :: Eq a => a -> BoolExpr a -> Bool # maximum :: Ord a => BoolExpr a -> a # minimum :: Ord a => BoolExpr a -> a # | |
Traversable BoolExpr | |
Functor BoolExpr | |
Boolean BoolExpr | |
Show a => Show (BoolExpr a) | |
Eq a => Eq (BoolExpr a) | |
Ord a => Ord (BoolExpr a) | |
Smart constructors for access checks
nodeDescendant :: NodeId -> BoolExpr AccessCheck #
nodeSuper :: NodeId -> BoolExpr AccessCheck #
nodeUser :: NodeId -> BoolExpr AccessCheck #
nodeChecks :: NodeId -> BoolExpr AccessCheck #
userMe :: UserId -> BoolExpr AccessCheck #