Skip to content
Snippets Groups Projects
Verified Commit 29db6421 authored by Brian Gilbert's avatar Brian Gilbert
Browse files

Issue #3484223 by realityloop: Add permission to disconnect openid connected accounts

parent d10926f8
No related branches found
No related merge requests found
Pipeline #323564 failed with stages
in 3 minutes and 26 seconds
......@@ -2,6 +2,10 @@ administer openid connect clients:
title: 'Administer OpenID Connect clients'
restrict access: TRUE
disconnect openid connected accounts:
title: 'Disconnect OpenID connected accounts'
restrict access: TRUE
manage own openid connect accounts:
title: 'Manage own connected accounts'
restrict access: TRUE
......
......@@ -209,6 +209,10 @@ class OpenIDConnectAccountsForm extends FormBase {
return AccessResult::allowed();
}
if ($this->currentUser->hasPermission('disconnect openid connected accounts')) {
return AccessResult::allowed();
}
if ($this->currentUser->id() && $this->currentUser->id() === $user->id() &&
$this->currentUser->hasPermission('manage own openid connect accounts')) {
return AccessResult::allowed();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment