Skip to content

Commit 14f9e1a

Browse files
committed
More permission removal cleanup
1 parent ad3a954 commit 14f9e1a

File tree

2 files changed

+9
-72
lines changed

2 files changed

+9
-72
lines changed

app/Models/ApiKey.php

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@ class ApiKey extends Model implements CleansAttributes, ValidableContract
1414
{
1515
use Eloquence, Validable;
1616

17+
/**
18+
* Different API keys that can exist on the system.
19+
*/
20+
const TYPE_NONE = 0;
21+
const TYPE_USER = 1;
22+
const TYPE_APPLICATION = 2;
23+
const TYPE_DAEMON_USER = 3;
24+
const TYPE_DAEMON_APPLICATION = 4;
25+
1726
/**
1827
* The length of API key identifiers.
1928
*/
@@ -124,14 +133,4 @@ public function getDecryptedTokenAttribute()
124133
{
125134
return app()->make(Encrypter::class)->decrypt($this->token);
126135
}
127-
128-
/**
129-
* Gets the permissions associated with a key.
130-
*
131-
* @return \Illuminate\Database\Eloquent\Relations\HasMany
132-
*/
133-
public function permissions()
134-
{
135-
return $this->hasMany(APIPermission::class, 'key_id');
136-
}
137136
}

tests/Unit/Services/Api/PermissionServiceTest.php

Lines changed: 0 additions & 62 deletions
This file was deleted.

0 commit comments

Comments
 (0)