Safe Haskell | None |
---|---|
Language | Haskell2010 |
- module Model.Authorize.Types
- selfAuthorize :: Party -> Authorize
- lookupAuthorizedChildren :: (MonadDB c m, MonadHasIdentity c m) => Party -> Maybe Permission -> m [Authorize]
- lookupAuthorizedParents :: (MonadDB c m, MonadHasIdentity c m) => Party -> Maybe Permission -> m [Authorize]
- data AuthorizeFilter
- lookupAuthorize :: MonadDB c m => AuthorizeFilter -> Party -> Party -> m (Maybe Authorize)
- lookupAuthorizeParent :: (MonadDB c m, MonadHasIdentity c m) => Party -> Id Party -> m (Maybe Authorize)
- lookupAuthorization :: (MonadDB c m, MonadHasIdentity c m) => Party -> Party -> m Authorization
- changeAuthorize :: MonadAudit c m => Authorize -> m ()
- removeAuthorize :: MonadAudit c m => Authorize -> m Bool
- authorizeExpired :: Authorize -> Timestamp -> Bool
- authorizeActive :: Authorize -> Timestamp -> Bool
- authorizeJSON :: ToObject o => Authorize -> o
- lookupAuthorizeActivity :: (MonadDB c m, MonadHasIdentity c m) => Int -> m [(Timestamp, Party)]
- makeAuthorize :: Access -> Maybe Timestamp -> Party -> Party -> Authorize
Documentation
module Model.Authorize.Types
selfAuthorize :: Party -> Authorize Source #
lookupAuthorizedChildren :: (MonadDB c m, MonadHasIdentity c m) => Party -> Maybe Permission -> m [Authorize] Source #
Get authorizations where the given party is the parent. When the permission argument has a value, then only provide active, approved authorizations, filtering out authorizations lower than the provided level.
lookupAuthorizedParents :: (MonadDB c m, MonadHasIdentity c m) => Party -> Maybe Permission -> m [Authorize] Source #
Get authorizations where the given party is the child. When the permission argument has a value, then only provide active, approved authorizations, filtering out authorizations lower than the provided level.
data AuthorizeFilter Source #
lookupAuthorize :: MonadDB c m => AuthorizeFilter -> Party -> Party -> m (Maybe Authorize) Source #
Attempt to find an authorization request or grant from the child party to the granting parent party. If authorize filter is ForPartyViewer, filter out expired authorizations.
lookupAuthorizeParent :: (MonadDB c m, MonadHasIdentity c m) => Party -> Id Party -> m (Maybe Authorize) Source #
Find an active authorization request or approval from child to parent.
lookupAuthorization :: (MonadDB c m, MonadHasIdentity c m) => Party -> Party -> m Authorization Source #
Get the core active authorization entry between a child and parent, after inheritance has been applied. Override authorize_view for the corner case of nobody as both parent and child.
changeAuthorize :: MonadAudit c m => Authorize -> m () Source #
Update or insert the authorization object. Use the request and identity context to log the change in the corresponding audit table as well.
removeAuthorize :: MonadAudit c m => Authorize -> m Bool Source #
authorizeJSON :: ToObject o => Authorize -> o Source #
lookupAuthorizeActivity :: (MonadDB c m, MonadHasIdentity c m) => Int -> m [(Timestamp, Party)] Source #