Zapier integration (#491)
* create zapier app * install sanctum * move OAuthProviderController * make `api-external` middleware * add zapier endpoints * add tests * token management * zapier event handler * add policy * use `slug` instead of `id` * wip * check policies * change api prefix to `external` * ui tweaks * validate token abilities * open zapier URL * zapier ui tweaks * update zap * Fix linting * Added sample endpoints + minor UI changes * Run PHP code linter --------- Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
14
app/Policies/PersonalAccessTokenPolicy.php
Normal file
14
app/Policies/PersonalAccessTokenPolicy.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace App\Policies;
|
||||
|
||||
use App\Models\User;
|
||||
use Laravel\Sanctum\PersonalAccessToken;
|
||||
|
||||
class PersonalAccessTokenPolicy
|
||||
{
|
||||
public function delete(User $user, PersonalAccessToken $token)
|
||||
{
|
||||
return $token->tokenable()->is($user);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user