Beispiel #1
0
 /**
  * Uploads the Change of a Status to the Database
  *
  * @param  boolean $desiredState If the module is enabled or not
  * @param  int $moduleId The Module-ID
  * @param  int $group The Group-ID
  */
 protected function modulerightStatusChangeUpload($desiredState, $moduleId, $group)
 {
     if ($desiredState) {
         GroupModuleRight::rightCreate($moduleId, $group->getId());
     } else {
         GroupModuleRight::rightDelete($moduleId, $group->getId());
     }
 }
Beispiel #2
0
 protected function applyRightsByGroups($groups)
 {
     $allRights = GroupModuleRight::rightsOfGroupsGet($groups);
     foreach ($groups as $group) {
         foreach ($allRights as $right) {
             if ($right['groupId'] == $group->getId()) {
                 $this->applyRight($right);
             }
         }
     }
 }