Changeset 952
- Timestamp:
- Aug 9, 2023, 7:36:56 PM (17 months ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/RSS/RSS.php
r912 r952 4 4 { 5 5 public array $RSSChannels; 6 6 public array $RSSChannelsPos; 7 7 8 function __construct(System $System) 8 9 { … … 14 15 $this->Description = 'Web site RSS channel management'; 15 16 $this->RSSChannels = array(); 17 $this->RSSChannelsPos = array(); 16 18 } 17 19 … … 70 72 else $ChannelName = ''; 71 73 if (array_key_exists('token', $_GET)) $Token = $_GET['token']; 72 else $Token = ''; 74 else $Token = ''; 73 75 if (array_key_exists($ChannelName, ModuleRSS::Cast($this->System->GetModule('RSS'))->RSSChannels)) 74 76 { -
trunk/Modules/User/UserModel.php
r934 r952 302 302 303 303 function CheckGroupPermission(string $GroupId, string $OperationId): bool 304 { 304 { 305 305 $PermissionExists = false; 306 306 // First try to check cache group-group relation … … 326 326 { 327 327 if ($DbRow['AssignedGroup'] != '') 328 if ($this->CheckGroupPermission($DbRow['AssignedGroup'], $OperationId) == true) return true; 328 { 329 if ($this->CheckGroupPermission($DbRow['AssignedGroup'], $OperationId) == true) return true; 330 } 329 331 } 330 332 } … … 383 385 384 386 if ($PermissionExists) 385 { 386 if ($this->User ['Id'] == null) $UserCondition = '(`User` IS NULL)';387 { 388 if ($this->User == null or $this->User['Id'] == null) $UserCondition = '(`User` IS NULL)'; 387 389 else $UserCondition = '(`User`="'.$this->User['Id'].'")'; 388 390 // Check user-operation relation … … 390 392 if ($DbResult->num_rows > 0) return true; 391 393 394 392 395 // Check user-group relation 393 $DbResult = $this->Database->select('PermissionUserAssignment', 'AssignedGroup', $UserCondition);396 $DbResult = $this->Database->select('PermissionUserAssignment', 'AssignedGroup', '(`AssignedGroup` IS NOT NULL) AND '.$UserCondition); 394 397 while ($DbRow = $DbResult->fetch_array()) 395 398 { 396 if ($this->CheckGroupPermission($DbRow['AssignedGroup'], $OperationId) == true) return true;399 if ($this->CheckGroupPermission($DbRow['AssignedGroup'], $OperationId) == true) return true; 397 400 } 398 401 return false; -
trunk/Packages/Common/Base.php
r899 r952 16 16 return get_called_class(); 17 17 } 18 19 public function __debugInfo() 20 { 21 $Vars = get_object_vars($this); 22 unset($Vars['System'], $Vars['Database']); 23 return $Vars; 24 } 18 25 }
Note:
See TracChangeset
for help on using the changeset viewer.