PalmarHealer 85d625d118
Rework subuser permission loading (#1311)
* Remove open in new tab since both are on filament now.

Removing the open in new tab since both are on filament now. And the tenant: null was function default so not needed aswell

* Rework permission tab loading

Reworked permission tab loading to make it easier to expand on it in the future. This is way more friendly if extensions are planned in the future.

* Rework permission tab loading

Reworked permission tab loading to make it easier to expand on it in the future. This is way more friendly if extensions are planned in the future.

* Rework permission tab loading

Reworked permission tab loading to make it easier to expand on it in the future. This is way more friendly if extensions are planned in the future.

* Update UserResource.php

Used wrong name. It's not the name, the label has to be checked there.

* Fix: wrong name used

Used wrong name. It's not the name, the label has to be checked there.

* Update permission loading
Moved permission list to app/Models/Permission.php and made UserResource.php and ListUsers.php use it.

* Fix Pint and PHPStan error
Added comments

* Update array key
Updated array key using the lowercase name. Suggested by https://github.com/Boy132

* Correct array key
Updated array key using the lowercase. Suggested by https://github.com/Boy132

* Revert/correct array key
Updated array key using the lowercase and the correct label.

* Add 'user' key
In the old $permission array was user an entry witch is missing in permissionTabs()

* Style and return
Added @return and removed empty lines

* pin
fix pint

* fix pint
remove @return

* fix pint
add () since pint is still not happy

* remove mb_strtolower
mb_strtolower is not necessary

* remove schema for control
remove ->schema for control tab.

* Remove import

Remove unused import

* correct translation key

Co-authored-by: Boy132 <Boy132@users.noreply.github.com>

* make columns optional,
checkboxList => columns is now optional and default to 2

* move user and control registration
removed control registration since it was duplicate and move user registration to permissionTabs

* update @return on permissionTabs()

* Fix array key warning

* simplify permissions data

* revert this

* fix edit modal

* update icons

---------

Co-authored-by: Boy132 <Boy132@users.noreply.github.com>
Co-authored-by: Boy132 <mail@boy132.de>
2025-05-05 17:35:17 -04:00

58 lines
5.3 KiB
PHP

<?php
return [
'permissions' => [
'activity_desc' => 'Permissions that control a user\'s access to the server activity logs.',
'startup_desc' => 'Permissions that control a user\'s ability to view this server\'s startup parameters.',
'settings_desc' => 'Permissions that control a user\'s ability to modify this server\'s settings.',
'control_desc' => 'Permissions that control a user\'s ability to control the power state of a server, or send commands.',
'user_desc' => 'Permissions that allow a user to manage other subusers on a server. They will never be able to edit their own account, or assign permissions they do not have themselves.',
'file_desc' => 'Permissions that control a user\'s ability to modify the filesystem for this server.',
'allocation_desc' => 'Permissions that control a user\'s ability to modify the port allocations for this server.',
'database_desc' => 'Permissions that control a user\'s access to the database management for this server.',
'backup_desc' => 'Permissions that control a user\'s ability to generate and manage server backups.',
'schedule_desc' => 'Permissions that control a user\'s access to the schedule management for this server.',
'startup_read' => 'Allows a user to view the startup variables for a server.',
'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.',
'settings_reinstall' => 'Allows a user to trigger a reinstall of this server.',
'settings_rename' => 'Allows a user to rename this server and change the description of it.',
'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.',
'control_start' => 'Allows a user to start the server instance.',
'control_stop' => 'Allows a user to stop the server instance.',
'control_restart' => 'Allows a user to restart the server instance.',
'control_kill' => 'Allows a user to kill the server instance.',
'user_create' => 'Allows a user to create new user accounts for the server.',
'user_read' => 'Allows a user permission to view users associated with this server.',
'user_update' => 'Allows a user to modify other users associated with this server.',
'user_delete' => 'Allows a user to delete other users associated with this server.',
'file_create' => 'Allows a user permission to create new files and directories.',
'file_read' => 'Allows a user to view the contents of a directory, but not view the contents of or download files.',
'file_read_content' => 'Allows a user to view the contents of a given file. This will also allow the user to download files.',
'file_update' => 'Allows a user to update files and folders associated with the server.',
'file_delete' => 'Allows a user to delete files and directories.',
'file_archive' => 'Allows a user to create file archives and decompress existing archives.',
'file_sftp' => 'Allows a user to perform the above file actions using a SFTP client.',
'allocation_read' => 'Allows a user to view all allocations currently assigned to this server. Users with any level of access to this server can always view the primary allocation.',
'allocation_update' => 'Allows a user to change the primary server allocation and attach notes to each allocation.',
'allocation_delete' => 'Allows a user to delete an allocation from the server.',
'allocation_create' => 'Allows a user to assign additional allocations to the server.',
'database_create' => 'Allows a user permission to create a new database for the server.',
'database_read' => 'Allows a user permission to view the server databases.',
'database_update' => 'Allows a user permission to make modifications to a database. If the user does not have the "View Password" permission as well they will not be able to modify the password.',
'database_delete' => 'Allows a user permission to delete a database instance.',
'database_view_password' => 'Allows a user permission to view a database password in the system.',
'schedule_create' => 'Allows a user to create a new schedule for the server.',
'schedule_read' => 'Allows a user permission to view schedules for a server.',
'schedule_update' => 'Allows a user permission to make modifications to an existing server schedule.',
'schedule_delete' => 'Allows a user to delete a schedule for the server.',
'backup_create' => 'Allows a user to create new backups for this server.',
'backup_read' => 'Allows a user to view all backups that exist for this server.',
'backup_delete' => 'Allows a user to remove backups from the system.',
'backup_download' => 'Allows a user to download a backup for the server. Danger: this allows a user to access all files for the server in the backup.',
'backup_restore' => 'Allows a user to restore a backup for the server. Danger: this allows the user to delete all of the server files in the process.',
],
];