aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoritz Strohm <strohm@data-quest.de>2022-05-03 12:26:37 +0200
committerMoritz Strohm <strohm@data-quest.de>2022-05-03 12:26:37 +0200
commitb7d0f273f2720c395301b33174ecc6cb5bc9aca0 (patch)
tree96085d6d6a20a14b53e21bdabb024b4087415fd0
parent877329f5cc6a934a9a3a1d3e0728e5783274d694 (diff)
check for CLI user
-rw-r--r--lib/models/resources/Room.class.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/models/resources/Room.class.php b/lib/models/resources/Room.class.php
index 254c728..92e73e8 100644
--- a/lib/models/resources/Room.class.php
+++ b/lib/models/resources/Room.class.php
@@ -67,7 +67,7 @@ class Room extends Resource
public function cbAddAdminPermission()
{
$current_user = User::findCurrent();
- if ($current_user) {
+ if ($current_user && $current_user->user_id != 'cli') {
//The current user is a real user and not nobody or a CLI script.
//Therefore, we can grant admin permissions to them.
$permission = new ResourcePermission();