Add support for changing the server default allocation as a normal user
This commit is contained in:
parent
5a3428f0a0
commit
d50ea18598
14 changed files with 308 additions and 68 deletions
|
@ -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,
|
||||
],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue