From b185a60b5317dee9cef5912913eb8af51b6d8aae Mon Sep 17 00:00:00 2001 From: Daeng Deni Mardaeni Date: Thu, 31 Oct 2024 11:27:34 +0700 Subject: [PATCH] Fix role assignment check on user creation form MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replaced Auth user roles check with the roles of the user being created. This ensures the correct role is pre-selected based on the user’s roles, rather than the creator's roles. --- resources/views/users/create.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/users/create.blade.php b/resources/views/users/create.blade.php index e6959ee..7265704 100644 --- a/resources/views/users/create.blade.php +++ b/resources/views/users/create.blade.php @@ -169,7 +169,7 @@
- name,Auth()->user()->roles->pluck('name')->toArray()) ? 'checked' : '' }} name="roles" type="radio" value="{{ $role->name }}"> + name,$user->roles->pluck("name")->toArray()) ? 'checked' : '' }} name="roles" type="radio" value="{{ $role->name }}">
@endforeach