Esempio n. 1
0
 /**
  * Saves the container rights
  */
 function Save()
 {
     $this->contentRights->Save();
     if (!$this->rights) {
         $this->rights = new BackendContainerRights();
     }
     $this->rights->SetEdit($this->Value('Edit'));
     $this->rights->SetRemove($this->Value('Remove'));
     $this->rights->SetContentRights($this->contentRights->Rights());
     $this->rights->Save();
 }
Esempio n. 2
0
 /**
  * Saves the page rights
  */
 function Save()
 {
     $this->contentRights->Save();
     if (!$this->rights) {
         $this->rights = new BackendPageRights();
     }
     $this->rights->SetCreateIn($this->Value('CreateIn'));
     $this->rights->SetEdit($this->Value('Edit'));
     $this->rights->SetMove($this->Value('Move'));
     $this->rights->SetRemove($this->Value('Remove'));
     $this->rights->SetContentRights($this->contentRights->Rights());
     $this->rights->Save();
 }
Esempio n. 3
0
 /**
  * Saves the content rights and user group
  */
 private function SaveRights()
 {
     $userGroup = Usergroup::Schema()->ByID($this->Value('UserGroup'));
     $this->Content()->SetUserGroup($userGroup);
     if (!$userGroup) {
         $oldRights = $this->Content()->GetUserGroupRights();
         if ($oldRights) {
             $oldRights->Delete();
         }
         $this->Content()->SetUserGroupRights(null);
     } else {
         $this->contentRights->Save();
         $this->Content()->SetUserGroupRights($this->contentRights->Rights());
     }
     $this->Content()->Save();
 }