databrary-1: Databrary

Safe HaskellNone
LanguageHaskell2010

Model.Party

Synopsis

Documentation

lookupParty :: (MonadDB c m, MonadHasIdentity c m) => Id Party -> m (Maybe Party) Source #

Given the id for a party, ensure ... and resolve the id to the full party object. The produced party has permissions for the retrieving viewer baked in.

lookupAuthParty :: (MonadDB c m, MonadHasIdentity c m) => Id Party -> m (Maybe Party) Source #

Find a party by id, populating the party's permission based on a complicated set of cascading rules that determines the current viewer's permissions over the party.

lookupSiteAuthByEmail Source #

Arguments

:: MonadDB c m 
=> Bool

be case-insensitive?

-> ByteString 
-> m (Maybe SiteAuth) 

resolve email to its party and enclosing account and site authenticated identity, possibly case insensitive

changeParty :: MonadAudit c m => Party -> m () Source #

addParty :: MonadAudit c m => Party -> m Party Source #

Create a new party without an account, intended for creating institution parties.

addAccount :: MonadAudit c m => Account -> m Account Source #

Create a new account without any authorizations, during registration, using the nobodySiteAuth. The account password will be blank. The party will not have any authorizations yet.

toFormattedParty :: Party -> FormattedParty Source #

Apply formatting and authorization to a core Party object, replacing partyJSON gradually

data PartyFilter Source #

Filter criteria and result paging options

Constructors

PartyFilter 

Fields