Merge pull request #16789 from grokability/fixes/#16475_delete_oauth_clients

Fixed #16475 - Allow deleting oauth client
This commit is contained in:
snipe 2025-04-22 17:48:24 +01:00 committed by GitHub
commit 2e31a0530f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -47,7 +47,7 @@ class OauthClients extends Component
{
// test for safety
// ->delete must be of type Client - thus the model binding
if ($clientId->created_by == auth()->id()) {
if ($clientId->user_id == auth()->id()) {
app(ClientRepository::class)->delete($clientId);
} else {
Log::warning('User ' . auth()->id() . ' attempted to delete client ' . $clientId->id . ' which belongs to user ' . $clientId->created_by);