Changeset 406 for trunk/user.php
- Timestamp:
- Oct 4, 2012, 7:59:51 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/user.php
r189 r406 194 194 { 195 195 // Check group-group relation 196 $DbResult = $this->Database->select('PermissionGroupAssignment', '*', '`Group`="'.$GroupId.'" AND ` Type`="Group"');197 while($DbRow = $DbResult->fetch_array()) 198 { 199 if($this->CheckGroupPermission($DbRow[' GroupOrOperation'], $OperationId) == true) return(true);196 $DbResult = $this->Database->select('PermissionGroupAssignment', '*', '`Group`="'.$GroupId.'" AND `AssignedGroup` IS NOT NULL'); 197 while($DbRow = $DbResult->fetch_array()) 198 { 199 if($this->CheckGroupPermission($DbRow['AssignedGroup'], $OperationId) == true) return(true); 200 200 } 201 201 202 202 // Check group-operation relation 203 $DbResult = $this->Database->select('PermissionGroupAssignment', '*', '`Group`="'.$GroupId.'" AND ` GroupOrOperation`="'.$OperationId.'" AND `Type`="Operation"');203 $DbResult = $this->Database->select('PermissionGroupAssignment', '*', '`Group`="'.$GroupId.'" AND `AssignedOperation`="'.$OperationId.'"'); 204 204 if($DbResult->num_rows > 0) return(true); 205 205 return(false); … … 215 215 216 216 // Check user-operation relation 217 $DbResult = $this->Database->select('PermissionUserAssignment', '*', '`User`="'.$this->User['Id'].'" AND ` GroupOrOperation`="'.$OperationId.'" AND `Type`="Operation"');217 $DbResult = $this->Database->select('PermissionUserAssignment', '*', '`User`="'.$this->User['Id'].'" AND `AssignedOperation`="'.$OperationId.'"'); 218 218 if($DbResult->num_rows > 0) return(true); 219 219 220 220 // Check user-group relation 221 $DbResult = $this->Database->select('PermissionUserAssignment', ' GroupOrOperation', '`User`="'.$this->User['Id'].'" AND `Type`="Group"');221 $DbResult = $this->Database->select('PermissionUserAssignment', 'AssignedGroup', '`User`="'.$this->User['Id'].'" AND `AssignedGroup` IS NOT NULL'); 222 222 while($DbRow = $DbResult->fetch_array()) 223 223 { 224 if($this->CheckGroupPermission($DbRow[' GroupOrOperation'], $OperationId) == true) return(true);224 if($this->CheckGroupPermission($DbRow['AssignedGroup'], $OperationId) == true) return(true); 225 225 } 226 226 return(false);
Note:
See TracChangeset
for help on using the changeset viewer.