mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-28 19:13:47 +02:00
Add support for changing the server default allocation as a normal user
This commit is contained in:
@@ -64,6 +64,16 @@ class Allocation extends Model implements CleansAttributes, ValidableContract
|
||||
'server_id' => 'nullable|exists:servers,id',
|
||||
];
|
||||
|
||||
/**
|
||||
* Return a hashid encoded string to represent the ID of the allocation.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getHashidAttribute()
|
||||
{
|
||||
return app()->make('hashids')->encode($this->id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Accessor to automatically provide the IP alias if defined.
|
||||
*
|
||||
|
||||
@@ -86,7 +86,8 @@ class Permission extends Model implements CleansAttributes, ValidableContract
|
||||
'delete-subuser' => null,
|
||||
],
|
||||
'server' => [
|
||||
'set-connection' => null,
|
||||
'view-allocations' => null,
|
||||
'edit-allocation' => null,
|
||||
'view-startup' => null,
|
||||
'edit-startup' => null,
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user