Changeset 406


Ignore:
Timestamp:
Oct 4, 2012, 7:59:51 AM (12 years ago)
Author:
chronos
Message:
Location:
trunk
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/user.php

    r189 r406  
    194194  {
    195195    // 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);
    200200    }
    201201
    202202    // 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.'"');
    204204    if($DbResult->num_rows > 0) return(true);
    205205    return(false);
     
    215215
    216216      // 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.'"');
    218218      if($DbResult->num_rows > 0) return(true);
    219219
    220220      // 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');
    222222      while($DbRow = $DbResult->fetch_array())
    223223      {
    224          if($this->CheckGroupPermission($DbRow['GroupOrOperation'], $OperationId) == true) return(true);
     224         if($this->CheckGroupPermission($DbRow['AssignedGroup'], $OperationId) == true) return(true);
    225225      }
    226226      return(false);
Note: See TracChangeset for help on using the changeset viewer.