Vanilla 1.1.5 is a product of Lussumo. More Information: Documentation, Community Support.
Help keep Vanilla free:// Remove permissions that were unset.
// Note: Regardless of which application created the permission, all should be able to remove it.
while (list($key,$value) = each($this->Permissions)){
if (!ForceBool($this->Permissions($key)){
unset($this->Permissions($key));
}
}if ($RoleID != 0){
// Get the current permissions from the database before reading form data.
// Ensures that behavior is consistent with how permissions are saved and displayed.
$RoleManager = $this->Context->ObjectFactory->NewContextObject($this->Context, 'RoleManager');
$ExistingRole = $RoleManager->GetRoleById($RoleID);
$this->Permissions = array_merge($this->Permissions,$ExistingRole->Permissions);
}
// Remove permissions that were unset.
// Note: Regardless of which application created the permission, all should be able to remove it.
while(list($PermissionName) = each($this->Permissions)) {
if (ForceBool($this->Permissions[$PermissionName])
=== ForceBool($this->Context->Configuration[$PermissionName])
) {
unset($this->Permissions[$PermissionName]);
}
}
Obsessive compulsive?
1 to 5 of 5