Public Member Functions | |
save ($runValidation=true, array $attributeNames=null) | |
getActualPermissions ($permitable=null) | |
__get ($attributeName) | |
Static Public Member Functions | |
static | getByName ($name) |
static | getDefaultMetadata () |
static | isTypeDeletable () |
Data Fields | |
$allowChangePermissionsRegardlessOfUser = false | |
Protected Member Functions | |
checkPermissionsHasAnyOf ($requiredPermissions) |
Definition at line 37 of file NamedSecurableItem.php.
static getByName | ( | $ | name | ) | [static] |
Given a name, check the cache if the model is cached and return. Otherwise check the database for the record, cache and return this model.
string | $name |
Reimplemented from Item.
Definition at line 50 of file NamedSecurableItem.php.
static getDefaultMetadata | ( | ) | [static] |
Returns the default meta data for the class. It must be appended to the meta data from the parent model, if any.
Reimplemented from SecurableItem.
Definition at line 77 of file NamedSecurableItem.php.
static isTypeDeletable | ( | ) | [static] |
To be overriden on intermediate derived classes to return false so that deletes are not done on intermediate classes because the object relational mapping will not clean up properly. For example if User is a Person, and Person is a RedBeanModel delete should be called only on User, not on Person. So User must override isDeletable to return false.
Reimplemented from SecurableItem.
Definition at line 94 of file NamedSecurableItem.php.
save | ( | $ | runValidation = true , |
|
array $ | attributeNames = null | |||
) |
Any changes to the model must be re-cached.
Reimplemented from Item.
Definition at line 103 of file NamedSecurableItem.php.
getActualPermissions | ( | $ | permitable = null |
) |
Override to add caching capabilities of this information.
Reimplemented from SecurableItem.
Definition at line 117 of file NamedSecurableItem.php.
__get | ( | $ | attributeName | ) |
Override for the 'name' attribute since 'name' can be retrieved regardless of permissions of the user asking for it.
Reimplemented from SecurableItem.
Definition at line 149 of file NamedSecurableItem.php.
checkPermissionsHasAnyOf | ( | $ | requiredPermissions | ) | [protected] |
Override to handle situation where the user should have permissions regardless of the permission afforded that user. This can happen if a user can modify groups, which would include modifying the NamedSecurableItems for the various modules, but does not have access to all those modules.
$requiredPermissions |
AccessDeniedSecurityException |
Reimplemented from SecurableItem.
Definition at line 165 of file NamedSecurableItem.php.