Changeset 132 for trunk/Packages/CoolWeb/Modules/UWebUser.pas
- Timestamp:
- Mar 18, 2022, 3:47:27 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/CoolWeb/Modules/UWebUser.pas
r114 r132 267 267 Result := False; 268 268 try 269 DbRows2 := TDbRows.Create; 270 271 // Check group-operation relation 272 Database.Select(DbRows2, 'PermissionGroupAssignment', 'Id', 273 '`User` = ' + IntToStr(Id) + ' AND `AssignedOperation` = ' + IntToStr(Operation)); 274 if DbRows2.Count > 0 then begin 269 DbRows2 := TDbRows.Create; 270 271 // Check group-operation relation 272 Database.Select(DbRows2, 'PermissionGroupAssignment', 'Id', 273 '`User` = ' + IntToStr(Id) + ' AND `AssignedOperation` = ' + IntToStr(Operation)); 274 if DbRows2.Count > 0 then begin 275 Result := True; 276 Exit; 277 end; 278 279 // Check group-group relation 280 Database.Select(DbRows2, 'PermissionGroupAssignment', 'AssignedGroup', 281 '`User` = ' + IntToStr(Id) + ' AND `AssignedGroup` IS NOT NULL'); 282 if DbRows2.Count > 0 then begin 283 if CheckGroupPermission(StrToInt(DbRows2[0].Values['AssignedGroup']), Operation) then begin 275 284 Result := True; 276 285 Exit; 277 286 end; 278 279 // Check group-group relation 280 Database.Select(DbRows2, 'PermissionGroupAssignment', 'AssignedGroup', 281 '`User` = ' + IntToStr(Id) + ' AND `AssignedGroup` IS NOT NULL'); 282 if DbRows2.Count > 0 then begin 283 if CheckGroupPermission(StrToInt(DbRows2[0].Values['AssignedGroup']), Operation) then begin 284 Result := True; 285 Exit; 286 end; 287 end; 288 finally 289 DbRows2.Free; 290 end; 287 end; 288 finally 289 DbRows2.Free; 290 end; 291 291 end; 292 292
Note:
See TracChangeset
for help on using the changeset viewer.