예제 #1
0
 /**             
  * Remove a permission from system
  *
  * @param integer $ID
  *        	permission id
  * @param boolean $Recursive
  *        	delete all descendants
  *        	
  */
 function Remove($ID, $Recursive = false)
 {
     $this->UnassignRoles($ID);
     if (!$Recursive) {
         return $this->permissions->DeleteConditional("ID=?", $ID);
     } else {
         return $this->permissions->DeleteSubtreeConditional("ID=?", $ID);
     }
 }
예제 #2
0
파일: rbac.php 프로젝트: toastedghost/rbac
 /**
  * Remove roles from system
  *
  * @param integer $ID
  *            role id
  * @param boolean $Recursive
  *            delete all descendants
  *
  */
 function remove($ID, $Recursive = false)
 {
     $this->unassignPermissions($ID);
     $this->unassignUsers($ID);
     if (!$Recursive) {
         return $this->roles->deleteConditional("ID=?", $ID);
     } else {
         return $this->roles->deleteSubtreeConditional("ID=?", $ID);
     }
 }