ItemAccess
class ItemAccess
Authenticator class that implements item access rules
Andromeda's access model goes as follows - 1) if you own an item (created it), you can access it and anything under it 2) users and groups can be granted access to an item (and its contents) via a Share 2b) Shares can control granular permissions like read/write/reshare, etc.
Properties
| private | $item | ||
| private | $share |
Methods
Returns the share object that grants access, or null if the item is owned
Primary authentication routine for granting access to an item
Returns whether the given account can access the given item without a share.
Same as ItemAccess::Authenticate() but returns null rather than client exceptions
Details
at line 27
private
__construct(Item $item, Share|null $share)
No description
at line 31
Item
GetItem()
Returns the item that is being accessed
at line 34
File
GetFile()
Returns the item that is being accessed (if applicable)
at line 37
Folder
GetFolder()
Returns the item that is being accessed (if applicable)
at line 40
Share|null
GetShare()
Returns the share object that grants access, or null if the item is owned
at line 59
static ItemAccess
Authenticate(ObjectDatabase $database, Input $input, Authenticator|null $authenticator, Item|null $item = null)
Primary authentication routine for granting access to an item
First option is the item is given and the account owns either the item or one of its parents. Second option is a share ID is given. Either the account must have access via a share, or a share key must be provided. The shared object will be used if one is not given.
at line 114
static protected bool
ItemOwnerAccess(Item $item, Account $account)
Returns whether the given account can access the given item without a share.
The account must own either the item or one of its parents
at line 128
static ItemAccess|null
TryAuthenticate(ObjectDatabase $database, Input $input, Authenticator|null $authenticator, Item|null $item = null)
Same as ItemAccess::Authenticate() but returns null rather than client exceptions