mirror of
https://github.com/keycloak/keycloak.git
synced 2026-05-28 04:13:22 -04:00
[FGAP] Override canList() for V2.
Closes #38641 Signed-off-by: vramik <vramik@redhat.com>
This commit is contained in:
parent
669acefd5c
commit
999d9aa75b
2 changed files with 8 additions and 1 deletions
|
|
@ -71,7 +71,9 @@ public interface ClientPermissionEvaluator {
|
|||
/**
|
||||
* Returns {@code true} if {@link #canView()} returns {@code true}.
|
||||
* <p/>
|
||||
* Or if the caller has at least one of the {@link AdminRoles#QUERY_CLIENTS} or {@link AdminRoles#QUERY_USERS} roles.
|
||||
* Or if the caller has at least one of the {@link AdminRoles#QUERY_CLIENTS} role.
|
||||
* <p/>
|
||||
* V1: or {@link AdminRoles#QUERY_USERS} roles.
|
||||
*/
|
||||
boolean canList();
|
||||
|
||||
|
|
|
|||
|
|
@ -48,6 +48,11 @@ class ClientPermissionsV2 extends ClientPermissions {
|
|||
super(session, realm, authz, root);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canList() {
|
||||
return root.hasOneAdminRole(AdminRoles.QUERY_CLIENTS) || canView();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canConfigure(ClientModel client) {
|
||||
if (canManage(client)) return true;
|
||||
|
|
|
|||
Loading…
Reference in a new issue