From f7b6173dc525a61439d0561ccac34f6fee175612 Mon Sep 17 00:00:00 2001 From: Vehikl Date: Thu, 24 Apr 2025 16:22:48 -0400 Subject: [PATCH] Add missing permissions --- app/Filament/Server/Resources/UserResource.php | 3 +++ app/Filament/Server/Resources/UserResource/Pages/ListUsers.php | 3 +++ app/Models/Permission.php | 3 ++- lang/en/server/users.php | 3 ++- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/Filament/Server/Resources/UserResource.php b/app/Filament/Server/Resources/UserResource.php index ff3c870ec..1edbd68ea 100644 --- a/app/Filament/Server/Resources/UserResource.php +++ b/app/Filament/Server/Resources/UserResource.php @@ -215,6 +215,7 @@ class UserResource extends Resource ], 'settings' => [ 'rename', + 'description', 'reinstall', 'activity', ], @@ -458,11 +459,13 @@ class UserResource extends Resource ->label('') ->options([ 'rename' => 'Rename', + 'description' => 'Description', 'reinstall' => 'Reinstall', 'activity' => 'Activity', ]) ->descriptions([ 'rename' => trans('server/users.permissions.setting_rename'), + 'description' => trans('server/users.permissions.setting_description'), 'reinstall' => trans('server/users.permissions.setting_reinstall'), 'activity' => trans('server/users.permissions.activity_desc'), ]), diff --git a/app/Filament/Server/Resources/UserResource/Pages/ListUsers.php b/app/Filament/Server/Resources/UserResource/Pages/ListUsers.php index 21a82ceee..373f9f03e 100644 --- a/app/Filament/Server/Resources/UserResource/Pages/ListUsers.php +++ b/app/Filament/Server/Resources/UserResource/Pages/ListUsers.php @@ -115,6 +115,7 @@ class ListUsers extends ListRecords ], 'settings' => [ 'rename', + 'description', 'reinstall', ], 'activity' => [ @@ -350,11 +351,13 @@ class ListUsers extends ListRecords ->columns(2) ->options([ 'rename' => 'Rename', + 'description' => 'Description', 'reinstall' => 'Reinstall', 'activity' => 'Activity', ]) ->descriptions([ 'rename' => trans('server/users.permissions.setting_rename'), + 'description' => trans('server/users.permissions.setting_description'), 'reinstall' => trans('server/users.permissions.setting_reinstall'), 'activity' => trans('server/users.permissions.activity_desc'), ]), diff --git a/app/Models/Permission.php b/app/Models/Permission.php index a950cd4f7..7ea7c95de 100644 --- a/app/Models/Permission.php +++ b/app/Models/Permission.php @@ -223,7 +223,8 @@ class Permission extends Model implements Validatable 'settings' => [ 'description' => 'Permissions that control a user\'s access to the settings for this server.', 'keys' => [ - 'rename' => 'Allows a user to rename this server and change the description of it.', + 'rename' => 'Allows a user to rename this server.', + 'description' => 'Allows a user to change the description of this server.', 'reinstall' => 'Allows a user to trigger a reinstall of this server.', ], ], diff --git a/lang/en/server/users.php b/lang/en/server/users.php index 77d90b370..8bbc1133a 100644 --- a/lang/en/server/users.php +++ b/lang/en/server/users.php @@ -16,7 +16,8 @@ return [ 'startup_update' => 'Allows a user to modify the startup variables for the server.', 'startup_docker_image' => 'Allows a user to modify the Docker image used when running the server.', 'setting_reinstall' => 'Allows a user to trigger a reinstall of this server.', - 'setting_rename' => 'Allows a user to rename this server and change the description of it.', + 'setting_rename' => 'Allows a user to rename this server.', + 'setting_description' => 'Allows a user to change the description of this server.', 'activity_read' => 'Allows a user to view the activity logs for the server.', 'websocket_*' => 'Allows a user access to the websocket for this server.', 'control_console' => 'Allows a user to send data to the server console.',