From b8479e42e77353dbcb5a8ce6ea0f0ef848b60b20 Mon Sep 17 00:00:00 2001 From: Roberto Guido Date: Sun, 17 Nov 2024 09:36:27 +0100 Subject: [PATCH] fix controllo permessi per gestione amici. closes #297 --- code/resources/views/booking/editwrap.blade.php | 2 +- code/resources/views/user/edit.blade.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/resources/views/booking/editwrap.blade.php b/code/resources/views/booking/editwrap.blade.php index 08d79306..5a7d4b21 100644 --- a/code/resources/views/booking/editwrap.blade.php +++ b/code/resources/views/booking/editwrap.blade.php @@ -37,7 +37,7 @@ @endif - @if($user->can('users.subusers')) + @if($user->can('users.subusers', $user->gas))
diff --git a/code/resources/views/user/edit.blade.php b/code/resources/views/user/edit.blade.php index 1deb7947..4a133459 100644 --- a/code/resources/views/user/edit.blade.php +++ b/code/resources/views/user/edit.blade.php @@ -14,7 +14,7 @@ $has_accounting = ($admin_editable || $currentuser->id == $user->id || $currentuser->can('movements.admin', $currentgas) || $currentuser->can('movements.view', $currentgas)) && ($user->isFriend() == false && someoneCan('movements.admin', $user->gas)); $has_stats = $has_accounting; $has_bookings = ($currentuser->id == $user->id); -$has_friends = $editable && $user->can('users.subusers'); +$has_friends = $editable && $user->can('users.subusers', $user->gas); $has_notifications = $user->isFriend() == false && $editable && ($currentgas->getConfig('notify_all_new_orders') == false); $friend_admin_buttons = []; @@ -182,7 +182,7 @@ {{ _i('Da qui รจ possibile riassegnare un amico ad un altro utente. Tutti i pagamenti pregressi resteranno addebitati a %s.', $user->parent->printableName()) }}

- +