NamedSecurableItem Class Reference

Inheritance diagram for NamedSecurableItem:
SecurableItem Item CustomFieldsModel RedBeanModel BeanModel ObservableComponent

Public Member Functions

 save ($runValidation=true, array $attributeNames=null)
 getActualPermissions ($permitable=null)
 processGetActualPermissionsAsNonOptimized ()
 __get ($attributeName)
 checkPermissionsHasAnyOf ($requiredPermissions, User $user=null)

Static Public Member Functions

static getByName ($name)
static getDefaultMetadata ()
static isTypeDeletable ()

Data Fields

 $allowChangePermissionsRegardlessOfUser = false

Detailed Description

Definition at line 37 of file NamedSecurableItem.php.

Member Function Documentation

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.

See also:

Reimplemented from Item.

Definition at line 103 of file NamedSecurableItem.php.

getActualPermissions ( permitable = null  ) 

Override to add caching capabilities of this information.

See also:

Reimplemented from SecurableItem.

Definition at line 117 of file NamedSecurableItem.php.

processGetActualPermissionsAsNonOptimized (  ) 

When there are many nested roles/groups, it is best to process non-security-optimized otherwise, the stored procedures are slow. Eventually need to probably remove stored procedures entirely, but for now this will be utilized. This should return true if you have many nested roles/groups.


Reimplemented from SecurableItem.

Definition at line 150 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.

See also:

Reimplemented from SecurableItem.

Definition at line 160 of file NamedSecurableItem.php.

checkPermissionsHasAnyOf ( requiredPermissions,
User user = null 

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.

null|User $user

Reimplemented from SecurableItem.

Definition at line 177 of file NamedSecurableItem.php.

The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Fri Nov 15 07:11:03 2019