More permission removal cleanup
This commit is contained in:
parent
ad3a954256
commit
14f9e1ad43
2 changed files with 9 additions and 72 deletions
|
@ -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');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue