All Data Structures Functions Variables Pages
Static Public Member Functions | Static Protected Member Functions
ReadPermissionsOptimizationUtil Class Reference

Static Public Member Functions

static rebuild ($overwriteExistingTables=true, $forcePhp=false, $messageStreamer=null)
 
static ownedSecurableItemCreated (OwnedSecurableItem $ownedSecurableItem)
 
static ownedSecurableItemOwnerChanged (OwnedSecurableItem $ownedSecurableItem, User $oldUser=null)
 
static securableItemBeingDeleted (SecurableItem $securableItem)
 
static securableItemGivenPermissionsForUser (SecurableItem $securableItem, User $user)
 
static securableItemGivenPermissionsForGroup (SecurableItem $securableItem, Group $group)
 
static securableItemLostPermissionsForUser (SecurableItem $securableItem, User $user)
 
static securableItemLostPermissionsForGroup (SecurableItem $securableItem, Group $group)
 
static userBeingDeleted ($user)
 
static userAddedToGroup (Group $group, User $user)
 
static userRemovedFromGroup (Group $group, User $user)
 
static groupAddedToGroup (Group $group)
 
static groupBeingRemovedFromGroup (Group $group)
 
static groupBeingDeleted ($group)
 
static roleParentSet (Role $role)
 
static roleParentBeingRemoved (Role $role)
 
static roleBeingDeleted (Role $role)
 
static userAddedToRole (User $user)
 
static userBeingRemovedFromRole (User $user, Role $role)
 
static getAllUpstreamGroupsRecursively (Group $group, &$groupMungeIds)
 
static recreateTable ($mungeTableName)
 
static getMungeTableName ($modelClassName)
 

Static Protected Member Functions

static rebuildViaSlowWay ($modelClassName)
 
static processNestedGroupWhereParentHasReadPermissionOnSecurableItem ($mungeTableName, $securableItemId, Group $group)
 
static getRoleMungeCount (SecurableItem $securableItem, Role $role)
 
static getSubRoleMungeCount (SecurableItem $securableItem, Role $role)
 
static getImmediateRoleMungeCount (SecurableItem $securableItem, Role $role)
 
static getGroupMungeCount (SecurableItem $securableItem, Group $group)
 
static groupAddedOrRemovedFromGroup ($isAdd, Group $group)
 
static getAllUsersInGroupAndChildGroupsRecursively (Group $group)
 
static getAllParentGroups (Group $group)
 
static roleParentSetOrRemoved ($isSet, Role $role)
 
static getAllUsersInRolesChildRolesRecursively (Role $role)
 
static getMungeTableSchemaByName ($tableName)
 
static incrementCount ($mungeTableName, $securableItemId, $item)
 
static setCount ($mungeTableName, $securableItemId, $item, $count)
 
static decrementCount ($mungeTableName, $securableItemId, $item)
 
static decrementCountForAllSecurableItems ($mungeTableName, $item)
 
static bulkIncrementCount ($mungeTableName, $securableItemIds, $item)
 
static bulkDecrementCount ($mungeTableName, $securableItemIds, $item)
 
static incrementParentRolesCounts ($mungeTableName, $securableItemId, Role $role)
 
static decrementParentRolesCounts ($mungeTableName, $securableItemId, Role $role)
 
static decrementParentRolesCountsForAllSecurableItems ($mungeTableName, Role $role)
 
static bulkIncrementParentRolesCounts ($mungeTableName, $securableItemIds, Role $role)
 
static bulkDecrementParentRolesCounts ($mungeTableName, $securableItemIds, Role $role)
 
static garbageCollect ($mungeTableName)
 
static getMungeType ($item)
 
static getMainTableName ($modelClassName)
 

Detailed Description

Definition at line 37 of file ReadPermissionsOptimizationUtil.php.

Member Function Documentation

static rebuild (   $overwriteExistingTables = true,
  $forcePhp = false,
  $messageStreamer = null 
)
static

At some point if performance is a problem with rebuilding activity models, then the stored procedure needs to be refactored to somehow support more joins dynamically.

See Also
https://www.pivotaltracker.com/story/show/38804909
Parameters
boolean$overwriteExistingTables
boolean$forcePhp

Definition at line 46 of file ReadPermissionsOptimizationUtil.php.

static ownedSecurableItemOwnerChanged ( OwnedSecurableItem  $ownedSecurableItem,
User  $oldUser = null 
)
static
Parameters
OwnedSecurableItem$ownedSecurableItem
User$oldUser

Definition at line 275 of file ReadPermissionsOptimizationUtil.php.

static securableItemGivenPermissionsForUser ( SecurableItem  $securableItem,
User  $user 
)
static
Parameters
SecurableItem$securableItem
User$user

Definition at line 309 of file ReadPermissionsOptimizationUtil.php.

static securableItemGivenPermissionsForGroup ( SecurableItem  $securableItem,
Group  $group 
)
static
Parameters
SecurableItem$securableItem
Group$group

Definition at line 326 of file ReadPermissionsOptimizationUtil.php.

static securableItemLostPermissionsForUser ( SecurableItem  $securableItem,
User  $user 
)
static
Parameters
SecurableItem$securableItem
User$user

Definition at line 353 of file ReadPermissionsOptimizationUtil.php.

static securableItemLostPermissionsForGroup ( SecurableItem  $securableItem,
Group  $group 
)
static
Parameters
SecurableItem$securableItem
Group$group

Definition at line 371 of file ReadPermissionsOptimizationUtil.php.

static userBeingDeleted (   $user)
static
Parameters
$user

Definition at line 394 of file ReadPermissionsOptimizationUtil.php.

static userAddedToGroup ( Group  $group,
User  $user 
)
static
Parameters
Group$group
User$user

Definition at line 416 of file ReadPermissionsOptimizationUtil.php.

static userRemovedFromGroup ( Group  $group,
User  $user 
)
static
Parameters
Group$group
User$user

Definition at line 439 of file ReadPermissionsOptimizationUtil.php.

static groupAddedToGroup ( Group  $group)
static
Parameters
Group$group

Definition at line 462 of file ReadPermissionsOptimizationUtil.php.

static groupBeingRemovedFromGroup ( Group  $group)
static
Parameters
Group$group

Definition at line 470 of file ReadPermissionsOptimizationUtil.php.

static groupBeingDeleted (   $group)
static
Parameters
$group

Definition at line 478 of file ReadPermissionsOptimizationUtil.php.

static roleParentSet ( Role  $role)
static
Parameters
Role$role

Definition at line 592 of file ReadPermissionsOptimizationUtil.php.

static roleParentBeingRemoved ( Role  $role)
static
Parameters
Role$role

Definition at line 601 of file ReadPermissionsOptimizationUtil.php.

static roleBeingDeleted ( Role  $role)
static
Parameters
Role$role

Definition at line 610 of file ReadPermissionsOptimizationUtil.php.

static userAddedToRole ( User  $user)
static
Parameters
User$user

Definition at line 776 of file ReadPermissionsOptimizationUtil.php.

static userBeingRemovedFromRole ( User  $user,
Role  $role 
)
static
Parameters
User$user
Role$role

Definition at line 814 of file ReadPermissionsOptimizationUtil.php.

static getAllUpstreamGroupsRecursively ( Group  $group,
$groupMungeIds 
)
static
Parameters
Group$group
array$groupMungeIds

Definition at line 850 of file ReadPermissionsOptimizationUtil.php.

static recreateTable (   $mungeTableName)
static

Public for testing only. Need to manually create test model tables that would not be picked up normally.

Definition at line 870 of file ReadPermissionsOptimizationUtil.php.

static getMungeTableName (   $modelClassName)
static
Parameters
$modelClassName
Returns
string

Definition at line 1089 of file ReadPermissionsOptimizationUtil.php.


The documentation for this class was generated from the following file:
Generated on Tue Mar 31 2020 07:11:17