allura.model.types
¶
- class allura.model.types.ACE(permissions, **kwargs)¶
Access Control Entry
- Variables:
access – either
ACE.ALLOW
orACE.DENY
reason (str) – optional, user-entered text
role_id – _id for a
ProjectRole
permission (str) – e.g. ‘read’, ‘create’, etc
- class allura.model.types.ACL(permissions=None, **kwargs)¶
Access Control List. Is an array of
ACE
- classmethod contains(ace, acl)¶
Test membership of ace in acl ignoring ace.reason field.
Return actual ACE with reason filled if ace is found in acl, None otherwise
e.g. ACL.contains(ace, acl) will return {role_id=ObjectId(…), permission=’read’, access=’DENY’, reason=’Spammer’} with following vars:
ace = M.ACE.deny(role_id, ‘read’) # reason = None acl = [{role_id=ObjectId(…), permission=’read’, access=’DENY’, reason=’Spammer’}]
- class allura.model.types.MarkdownCache(**kw)¶