|
@@ 346-348 (lines=3) @@
|
| 343 |
|
|
| 344 |
|
// If not permitted |
| 345 |
|
$subAdminManager = $this->groupManager->getSubAdmin(); |
| 346 |
|
if(!$this->groupManager->isAdmin($currentLoggedInUser->getUID()) && !$subAdminManager->isUserAccessible($currentLoggedInUser, $targetUser)) { |
| 347 |
|
return new Result(null, 997); |
| 348 |
|
} |
| 349 |
|
|
| 350 |
|
// Go ahead with the delete |
| 351 |
|
if($targetUser->delete()) { |
|
@@ 393-395 (lines=3) @@
|
| 390 |
|
|
| 391 |
|
// If not permitted |
| 392 |
|
$subAdminManager = $this->groupManager->getSubAdmin(); |
| 393 |
|
if(!$this->groupManager->isAdmin($currentLoggedInUser->getUID()) && !$subAdminManager->isUserAccessible($currentLoggedInUser, $targetUser)) { |
| 394 |
|
return new Result(null, 997); |
| 395 |
|
} |
| 396 |
|
|
| 397 |
|
// enable/disable the user now |
| 398 |
|
$targetUser->setEnabled($value); |