You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: app/Models/Permission.php
+58-73Lines changed: 58 additions & 73 deletions
Original file line number
Diff line number
Diff line change
@@ -98,105 +98,90 @@ class Permission extends Validable
98
98
*/
99
99
protectedstatic$permissions = [
100
100
'websocket' => [
101
-
// Allows the user to connect to the server websocket, this will give them
102
-
// access to view the console output as well as realtime server stats (CPU
103
-
// and Memory usage).
104
-
'*',
101
+
'description' => 'Allows the user to connect to the server websocket, giving them access to view console output and realtime server stats.',
102
+
'keys' => [
103
+
'*' => 'Gives user full read access to the websocket.',
104
+
],
105
105
],
106
106
107
107
'control' => [
108
-
// Allows the user to send data to the server console process. A user with this
109
-
// permission will not be able to stop the server directly by issuing the specified
110
-
// stop command for the Egg, however depending on plugins and server configuration
111
-
// they may still be able to control the server power state.
112
-
'console', // power.send-command
113
-
114
-
// Allows the user to start/stop/restart/kill the server process.
115
-
'start', // power.power-start
116
-
'stop', // power.power-stop
117
-
'restart', // power.power-restart
118
-
'kill', // power.power-kill
108
+
'description' => 'Permissions that control a user\'s ability to control the power state of a server, or send commands.',
109
+
'keys' => [
110
+
'console' => 'Allows a user to send commands to the server instance via the console.',
111
+
'start' => 'Allows a user to start the server if it is stopped.',
112
+
'stop' => 'Allows a user to stop a server if it is running.',
113
+
'restart' => 'Allows a user to perform a server restart. This allows them to start the server if it is offline, but not put the server in a completely stopped state.',
114
+
'kill' => 'Allows a user to terminate a server process.',
115
+
],
119
116
],
120
117
121
118
'user' => [
122
-
// Allows a user to create a new user assigned to the server. They will not be able
123
-
// to assign any permissions they do not already have on their account as well.
'description' => '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.',
120
+
'keys' => [
121
+
'create' => 'Allows a user to create new subusers for the server.',
122
+
'read' => 'Allows the user to view subusers and their permissions for the server.',
123
+
'update' => 'Allows a user to modify other subusers.',
124
+
'delete' => 'Allows a user to delete a subuser from the server.',
125
+
],
128
126
],
129
127
130
128
'file' => [
131
-
// Allows a user to create additional files and folders either via the Panel,
// Allows the user to connect and manage server files using their account
151
-
// credentials and a SFTP client.
152
-
'sftp', // files.access-sftp
129
+
'description' => 'Permissions that control a user\'s ability to modify the filesystem for this server.',
130
+
'keys' => [
131
+
'create' => 'Allows a user to create additional files and folders via the Panel or direct upload.',
132
+
'read' => 'Allows a user to view the contents of a directory and read the contents of a file. Users with this permission can also download files.',
133
+
'update' => 'Allows a user to update the contents of an existing file or directory.',
134
+
'delete' => 'Allows a user to delete files or directories.',
135
+
'archive' => 'Allows a user to archive the contents of a directory as well as decompress existing archives on the system.',
136
+
'sftp' => 'Allows a user to connect to SFTP and manage server files using the other assigned file permissions.',
137
+
],
153
138
],
154
139
155
140
// Controls permissions for editing or viewing a server's allocations.
156
141
'allocation' => [
157
-
'read', // server.view-allocations
158
-
'update', // server.edit-allocation
142
+
'description' => 'Permissions that control a user\'s ability to modify the port allocations for this server.',
143
+
'keys' => [
144
+
'read' => 'Allows a user to view the allocations assigned to this server.',
145
+
'update' => 'Allows a user to modify the allocations assigned to this server.',
146
+
],
159
147
],
160
148
161
149
// Controls permissions for editing or viewing a server's startup parameters.
162
150
'startup' => [
163
-
'read', // server.view-startup
164
-
'update', // server.edit-startup
151
+
'description' => 'Permissions that control a user\'s ability to view this server\'s startup parameters.',
152
+
'keys' => [
153
+
'read' => '',
154
+
'update' => '',
155
+
],
165
156
],
166
157
167
158
'database' => [
168
-
// Allows a user to create a new database for a server.
169
-
'create', // database.create-database
170
-
171
-
// Allows a user to view the databases associated with the server. If they do not also
172
-
// have the view_password permission they will only be able to see the connection address
173
-
// and the name of the user.
174
-
'read', // database.view-databases
175
-
176
-
// Allows a user to rotate the password on a database instance. If the user does not
177
-
// alow have the view_password permission they will not be able to see the updated password
178
-
// anywhere, but it will still be rotated.
179
-
'update', // database.reset-db-password
180
-
181
-
// Allows a user to delete a database instance.
182
-
'delete', // database.delete-database
183
-
184
-
// Allows a user to view the password associated with a database instance for the
185
-
// server. Note that a user without this permission may still be able to access these
186
-
// credentials by viewing files or the console.
187
-
'view_password', // database.reset-db-password
159
+
'description' => 'Permissions that control a user\'s access to the database management for this server.',
160
+
'keys' => [
161
+
'create' => 'Allows a user to create a new database for this server.',
162
+
'read' => 'Allows a user to view the database associated with this server.',
163
+
'update' => 'Allows a user to rotate the password on a database instance. If the user does not have the view_password permission they will not see the updated password.',
164
+
'delete' => 'Allows a user to remove a database instance from this server.',
165
+
'view_password' => 'Allows a user to view the password associated with a database instance for this server.',
0 commit comments