コード例 #1
0
ファイル: SiteRights.php プロジェクト: agentmedia/phine-core
 /**
  * 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();
 }
コード例 #2
0
ファイル: PageForm.php プロジェクト: agentmedia/phine-core
 /**
  * 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();
 }