mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-18 22:33:44 +02:00
More permission removal cleanup
This commit is contained in:
@@ -14,6 +14,15 @@ class ApiKey extends Model implements CleansAttributes, ValidableContract
|
||||
{
|
||||
use Eloquence, Validable;
|
||||
|
||||
/**
|
||||
* Different API keys that can exist on the system.
|
||||
*/
|
||||
const TYPE_NONE = 0;
|
||||
const TYPE_USER = 1;
|
||||
const TYPE_APPLICATION = 2;
|
||||
const TYPE_DAEMON_USER = 3;
|
||||
const TYPE_DAEMON_APPLICATION = 4;
|
||||
|
||||
/**
|
||||
* The length of API key identifiers.
|
||||
*/
|
||||
@@ -124,14 +133,4 @@ class ApiKey extends Model implements CleansAttributes, ValidableContract
|
||||
{
|
||||
return app()->make(Encrypter::class)->decrypt($this->token);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the permissions associated with a key.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function permissions()
|
||||
{
|
||||
return $this->hasMany(APIPermission::class, 'key_id');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user