/** * Saves the site rights */ function Save() { $this->pageRights->Save(); if (!$this->rights) { $this->rights = new BackendSiteRights(); } $this->rights->SetEdit($this->Value('Edit')); $this->rights->SetRemove($this->Value('Remove')); $this->rights->SetPageRights($this->pageRights->Rights()); $this->rights->Save(); }
/** * Saves the group and right settings */ private function SaveRights() { $groupID = $this->Value('UserGroup'); $userGroup = Usergroup::Schema()->ByID($groupID); $this->page->SetUserGroup($userGroup); if (!$userGroup) { $oldRights = $this->page->GetUserGroupRights(); if ($oldRights) { $oldRights->GetContentRights()->Delete(); } $this->page->SetUserGroupRights(null); } else { $this->pageRights->Save(); $this->page->SetUserGroupRights($this->pageRights->Rights()); } $this->page->Save(); }