Acquire.Storage._aclrules module¶
-
class
ACLRules(rule=None, rules=None, default_rule=None, default_operation=<ACLRuleOperation.MAX: 'max'>)[source]¶ Bases:
objectThis class holds a combination of ACL rules. These are parsed in order to get the ACL for a resource.
By default, this is a simple inherit rule (meaning that it will inherit whatever comes from upstream)
-
append(aclrule, operation=None, ensure_owner=False)[source]¶ Append a rule onto the set of rules. This will resolve any conflicts in the rules. If ‘ensure_owner’ is True, then this will ensure that there is at least one user who has unambiguous ownership of the resource controlled by these ACL rules
-
insert(idx, aclrule, operation=None, ensure_owner=False)[source]¶ Insert the passed rule at index ‘idx’, specifying the operation used to combine this rule with what has gone before (defaults to self._default_operation)
-
resolve(must_resolve=True, **kwargs)[source]¶ Resolve the rule based on the passed kwargs. This will resolve the rules in order the final ACLRule has been generated. If ‘must_resolve’ is True, then this is guaranteed to return a fully-resolved simple ACLRule
-
rules()[source]¶ Return the list of ACL rules that will be applied in order (including the default rule, if set)
-
set_default_operation(default_operation)[source]¶ Set the default operation used to combine together rules
-
-
class
ACLUserRules[source]¶ Bases:
objectThis class holds rules that apply to individual users
-
static
executer(user_guid=None, user_guids=None)[source]¶ Simple shorthand to create the rule that the specified user is the executer of the resource
-
static
from_data(data)[source]¶ Return the rules constructed from the passed json-deserialised object
-
static
owner(user_guid=None, user_guids=None)[source]¶ Simple shorthand to create the rule that the specified user is the owner of the resource
-
static
reader(user_guid=None, user_guids=None)[source]¶ Simple shorthand to create the rule that the specified user is the reader of the resource
-
static
-
class
ACLGroupRules[source]¶ Bases:
objectThis class holds rules that apply to individual groups
-
static
from_data(data)[source]¶ Return the rules constructed from the passed json-deserialised object
-
static