diff options
| author | Elmar Ludwig <elmar.ludwig@uni-osnabrueck.de> | 2022-05-03 13:47:02 +0000 |
|---|---|---|
| committer | Moritz Strohm <strohm@data-quest.de> | 2022-05-03 13:47:02 +0000 |
| commit | caa4243d2ebc3e7f6dae1440bdab957768b11e66 (patch) | |
| tree | 79d7a05496347c333984b07abdbec58e57a8c516 /lib/models/resources | |
| parent | b7d0f273f2720c395301b33174ecc6cb5bc9aca0 (diff) | |
use ResourcePermisson::createtic-01005
Diffstat (limited to 'lib/models/resources')
| -rw-r--r-- | lib/models/resources/Room.class.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/models/resources/Room.class.php b/lib/models/resources/Room.class.php index 92e73e8..9fb5890 100644 --- a/lib/models/resources/Room.class.php +++ b/lib/models/resources/Room.class.php @@ -70,11 +70,11 @@ class Room extends Resource 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(); - $permission->resource_id = $this->id; - $permission->user_id = $current_user->id; - $permission->perms = 'admin'; - $permission->store(); + ResourcePermission::create([ + 'resource_id' => $this->id, + 'user_id' => $current_user->id, + 'perms' => 'admin' + ]); } } |
