Acquire.Storage._aclrule module

class ACLRule(is_owner=None, is_readable=None, is_writeable=None, is_executable=None)[source]

Bases: object

This class holds the access control list (ACL) rule for a particular user accessing a particular resource

static denied()[source]

Return a “denied” (no-access at all) permission rule

denied_all()[source]

Return whether or not this rule shows that everything is denied

static executer()[source]

Return the ACLRule of an executer

static from_data(data)[source]

Return this object constructed from the passed json-deserialised dictionary

static inherit()[source]

Return the ACL rule that means ‘inherit permissions from parent’

inherits_all()[source]

Return whether or not this rule inherits all permissions

inherits_executable()[source]

Return whether or not this inherits the executable status from upstream

inherits_owner()[source]

Return whether or not this inherits the owner status from upstream

inherits_readable()[source]

Return whether or not this inherits the reader status from upstream

inherits_writeable()[source]

Return whether or not this inherits the writeable status from upstream

is_executable()[source]

Return whether or not the user can execute this resource

is_fully_resolved()[source]

Return whether or not this rule is fully resolved

is_owner()[source]

Return whether or not the user is the owner of this resource

is_readable()[source]

Return whether or not the user can read this resource

is_writeable()[source]

Return whether or not the user can write to this resource

static null()[source]

Return a null (inherit all permissions) rule

static owner()[source]

Return the ACLRule of an owner

static reader()[source]

Return the ACLRule of a reader

resolve(must_resolve=True, **kwargs)[source]

Resolve these rules based on the information supplied in ‘kwargs’. Notably, if any of our rules are ‘inherit’, the this will look for an ACLRule called “upstream” to inherit the rule. If ‘must_resolve’ is true, then this function must always return a fully-resolved ACLRule

set_inherits_owner()[source]

Set that this ACL inherits ownership from its parent

set_inherits_readable()[source]

Set that this ACL inherits readable from its parent

set_inherits_writeable()[source]

Set that this ACL inherits writeable from its parent

set_owner(is_owner=True)[source]

Set the user as an owner of the bucket

set_readable(is_readable=True)[source]

Set the readable rule to ‘is_readable’

set_readable_writeable(is_readable_writeable=True)[source]

Set both the readable and writeable rules to ‘is_readable_writeable’

set_writeable(is_writeable=True)[source]

Set the writeable rule to ‘is_writeable’

to_data()[source]

Return this object converted to a json-serialisable object

static writer()[source]

Return the ACLRule of a writer