Skip to content

Commit

Permalink
Use correct roles collections
Browse files Browse the repository at this point in the history
  • Loading branch information
distantnative committed Sep 8, 2024
1 parent a087ced commit 40a079a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config/areas/users/dialogs.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
'pattern' => 'users/create',
'load' => function () {
$kirby = App::instance();
$roles = $kirby->roles();
$roles = $kirby->user()->roles('create');

// get default value for role
if ($role = $kirby->request()->get('role')) {
Expand Down Expand Up @@ -234,7 +234,7 @@
'props' => [
'fields' => [
'role' => Field::role(
roles: App::instance()->roles(),
roles: $user->roles('change'),
props: [
'label' => I18n::translate('user.changeRole.select'),
'required' => true,
Expand Down

0 comments on commit 40a079a

Please sign in to comment.