All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.keycloak.services.resources.admin.permissions.ManagementPermissions Maven / Gradle / Ivy

There is a newer version: 0.32
Show newest version
package org.keycloak.services.resources.admin.permissions;

import org.keycloak.models.KeycloakSession;
import org.keycloak.models.RealmModel;
import org.keycloak.services.resources.admin.AdminAuth;

// I'm not sure if this is a good idea, but it seems to be the only way to get admin permissions
public class ManagementPermissions {
  public static boolean hasOneAdminRole(
      KeycloakSession session, RealmModel realm, AdminAuth auth, String... adminRoles) {
    return new MgmtPermissions(session, realm, auth).hasOneAdminRole(adminRoles);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy