From 33d4844f17b9580a1577a398d20c249359ab53ec Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Sun, 22 Jan 2017 12:16:02 +0000 Subject: [PATCH] Fixed role 'manage own permissions' permission --- app/Repos/PermissionsRepo.php | 2 +- resources/views/settings/roles/form.blade.php | 2 +- resources/views/users/create.blade.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Repos/PermissionsRepo.php b/app/Repos/PermissionsRepo.php index e1c6d87b1..aa58d1718 100644 --- a/app/Repos/PermissionsRepo.php +++ b/app/Repos/PermissionsRepo.php @@ -93,7 +93,7 @@ class PermissionsRepo $permissions = isset($roleData['permissions']) ? array_keys($roleData['permissions']) : []; $this->assignRolePermissions($role, $permissions); - if ($role->name === 'admin') { + if ($role->system_name === 'admin') { $permissions = $this->permission->all()->pluck('id')->toArray(); $role->permissions()->sync($permissions); } diff --git a/resources/views/settings/roles/form.blade.php b/resources/views/settings/roles/form.blade.php index 319f3a2df..71b8f551f 100644 --- a/resources/views/settings/roles/form.blade.php +++ b/resources/views/settings/roles/form.blade.php @@ -18,7 +18,7 @@ - + diff --git a/resources/views/users/create.blade.php b/resources/views/users/create.blade.php index bff79820a..de3a3151f 100644 --- a/resources/views/users/create.blade.php +++ b/resources/views/users/create.blade.php @@ -8,7 +8,7 @@
@@ -16,7 +16,7 @@
-

Create User

+

{{ trans('settings.users_add_new') }}

{!! csrf_field() !!}