gargantext-0.0.7.1.5.3: Search, map, share
Safe HaskellSafe-Inferred
LanguageHaskell2010

Gargantext.API.Auth.PolicyCheck

Synopsis

Documentation

data AccessCheck #

A type representing all the possible access checks we might want to perform on a resource, typically a Node.

Constructors

AC_node_descendant !NodeId

Grants access if the input NodeId is a descendant of the one for the logged-in user.

AC_node_shared !NodeId

Grants access if the input NodeId is shared with the logged-in user.

AC_user_node !NodeId

Grants access if the input NodeId is the logged-in user.

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

Instances details
Show AccessCheck # 
Instance details

Defined in Gargantext.API.Auth.PolicyCheck

Eq AccessCheck # 
Instance details

Defined in Gargantext.API.Auth.PolicyCheck

data AccessResult #

The result of an access check.

Constructors

Allow

Grants access.

Deny ServerError

Denies access with the given ServerError.

data AccessPolicyManager #

An access policy manager for gargantext that governs how resources are accessed and who is entitled to see what.

Instances

Instances details
AddSetCookies ('S n) old new => AddSetCookies ('S n) (AccessPolicyManager -> old) new # 
Instance details

Defined in Gargantext.API.Auth.PolicyCheck

Methods

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

Instances details
HasEndpoint sub => HasEndpoint (PolicyChecked sub :: Type) # 
Instance details

Defined in Gargantext.API.Auth.PolicyCheck

HasSwagger sub => HasSwagger (PolicyChecked sub :: Type) # 
Instance details

Defined in Gargantext.API.Auth.PolicyCheck

HasSwagger (WithCustomErrorScheme GargAPI) # 
Instance details

Defined in Gargantext.API.Routes

HasServer subApi ctx => HasServer (PolicyChecked subApi :: Type) ctx # 
Instance details

Defined in Gargantext.API.Auth.PolicyCheck

Associated Types

type ServerT (PolicyChecked subApi) m #

Methods

route :: Proxy (PolicyChecked subApi) -> Context ctx -> Delayed env (Server (PolicyChecked subApi)) -> Router env #

hoistServerWithContext :: Proxy (PolicyChecked subApi) -> Proxy ctx -> (forall x. m x -> n x) -> ServerT (PolicyChecked subApi) m -> ServerT (PolicyChecked subApi) n #

type ServerT (PolicyChecked subApi :: Type) m # 
Instance details

Defined in Gargantext.API.Auth.PolicyCheck

type ServerT (PolicyChecked subApi :: Type) m = AccessPolicyManager -> ServerT subApi m
type AddSetCookieApi (PolicyChecked a) # 
Instance details

Defined in Gargantext.API.Auth.PolicyCheck

data BoolExpr a #

Syntax of boolean expressions parameterized over a set of leaves, named constants.

Constructors

BAnd (BoolExpr a) (BoolExpr a) 
BOr (BoolExpr a) (BoolExpr a) 
BNot (BoolExpr a) 
BTrue 
BFalse 
BConst (Signed a) 

Instances

Instances details
Foldable BoolExpr 
Instance details

Defined in Data.BoolExpr

Methods

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 #

toList :: BoolExpr a -> [a] #

null :: BoolExpr a -> Bool #

length :: BoolExpr a -> Int #

elem :: Eq a => a -> BoolExpr a -> Bool #

maximum :: Ord a => BoolExpr a -> a #

minimum :: Ord a => BoolExpr a -> a #

sum :: Num a => BoolExpr a -> a #

product :: Num a => BoolExpr a -> a #

Traversable BoolExpr 
Instance details

Defined in Data.BoolExpr

Methods

traverse :: Applicative f => (a -> f b) -> BoolExpr a -> f (BoolExpr b) #

sequenceA :: Applicative f => BoolExpr (f a) -> f (BoolExpr a) #

mapM :: Monad m => (a -> m b) -> BoolExpr a -> m (BoolExpr b) #

sequence :: Monad m => BoolExpr (m a) -> m (BoolExpr a) #

Functor BoolExpr 
Instance details

Defined in Data.BoolExpr

Methods

fmap :: (a -> b) -> BoolExpr a -> BoolExpr b #

(<$) :: a -> BoolExpr b -> BoolExpr a #

Boolean BoolExpr 
Instance details

Defined in Data.BoolExpr

Show a => Show (BoolExpr a) 
Instance details

Defined in Data.BoolExpr

Methods

showsPrec :: Int -> BoolExpr a -> ShowS #

show :: BoolExpr a -> String #

showList :: [BoolExpr a] -> ShowS #

Eq a => Eq (BoolExpr a) 
Instance details

Defined in Data.BoolExpr

Methods

(==) :: BoolExpr a -> BoolExpr a -> Bool #

(/=) :: BoolExpr a -> BoolExpr a -> Bool #

Ord a => Ord (BoolExpr a) 
Instance details

Defined in Data.BoolExpr

Methods

compare :: BoolExpr a -> BoolExpr a -> Ordering #

(<) :: BoolExpr a -> BoolExpr a -> Bool #

(<=) :: BoolExpr a -> BoolExpr a -> Bool #

(>) :: BoolExpr a -> BoolExpr a -> Bool #

(>=) :: BoolExpr a -> BoolExpr a -> Bool #

max :: BoolExpr a -> BoolExpr a -> BoolExpr a #

min :: BoolExpr a -> BoolExpr a -> BoolExpr a #

Smart constructors for access checks