allow non admins to delete their clients
This commit is contained in:
parent
6195f879db
commit
7e56e0eec4
@ -312,7 +312,9 @@ export class OAuth2AdminController {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (client.activated) {
|
const isAdmin = this._service.userHasPrivilege(user, 'admin:oauth2');
|
||||||
|
|
||||||
|
if (client.activated && isAdmin) {
|
||||||
throw new BadRequestException('Please deactivate the client first.');
|
throw new BadRequestException('Please deactivate the client first.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user