Push basis of new API key policy

Will need to revisit this another day when I’m fresh to figure out the
best method to do this.
This commit is contained in:
Dane Everitt 2017-04-07 21:25:17 -04:00
parent 51204b8d9d
commit db4df2bfa1
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
6 changed files with 104 additions and 19 deletions

View file

@ -45,7 +45,7 @@ class ServerPolicy
return true;
}
$permissions = Cache::remember('ServerPolicy.' . $user->uuid . $server->uuid, Carbon::now()->addSeconds(10), function () use ($user, $server) {
$permissions = Cache::remember('ServerPolicy.' . $user->uuid . $server->uuid, Carbon::now()->addSeconds(5), function () use ($user, $server) {
return $user->permissions()->server($server)->get()->transform(function ($item) {
return $item->permission;
})->values();