Class RoleLDAPStorageMapper.LDAPRoleMappingsUserDelegate
java.lang.Object
org.keycloak.models.utils.UserModelDelegate
org.keycloak.storage.ldap.mappers.membership.role.RoleLDAPStorageMapper.LDAPRoleMappingsUserDelegate
- All Implemented Interfaces:
RoleMapperModel,UserModel
- Enclosing class:
- RoleLDAPStorageMapper
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.keycloak.models.UserModel
UserModel.RequiredAction, UserModel.SearchableFields, UserModel.UserRemovedEvent -
Field Summary
Fields inherited from class org.keycloak.models.utils.UserModelDelegate
delegateFields inherited from interface org.keycloak.models.UserModel
COMPARE_BY_USERNAME, DISABLED_REASON, EMAIL, EMAIL_VERIFIED, ENABLED, EXACT, FIRST_NAME, GROUPS, IDP_ALIAS, IDP_USER_ID, INCLUDE_SERVICE_ACCOUNT, LAST_NAME, LOCALE, SEARCH, USERNAME -
Constructor Summary
ConstructorsConstructorDescriptionLDAPRoleMappingsUserDelegate(RealmModel realm, UserModel user, LDAPObject ldapUser, RoleContainerModel targetRoleContainer) -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteRoleMapping(RoleModel role) Removes the given role mapping from this object.Returns stream of client roles that are directly set to this object for the given client.Returns stream of realm roles that are directly set to this object.Returns stream of all role (both realm all client) that are directly set to this object.voidGrants the given role to this object.booleanReturnstrueif this object is directly or indirectly assigned the given role,falseotherwise.Methods inherited from class org.keycloak.models.utils.UserModelDelegate
addRequiredAction, addRequiredAction, credentialManager, equals, getAttributes, getAttributeStream, getCreatedTimestamp, getDelegate, getEmail, getFederationLink, getFirstAttribute, getFirstName, getGroupsStream, getId, getLastName, getRequiredActionsStream, getServiceAccountClientLink, getUsername, hashCode, isEmailVerified, isEnabled, isMemberOf, joinGroup, leaveGroup, removeAttribute, removeRequiredAction, removeRequiredAction, setAttribute, setCreatedTimestamp, setEmail, setEmailVerified, setEnabled, setFederationLink, setFirstName, setLastName, setServiceAccountClientLink, setSingleAttribute, setUsernameMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.keycloak.models.RoleMapperModel
hasDirectRoleMethods inherited from interface org.keycloak.models.UserModel
getGroupsCount, getGroupsCountByNameContaining, getGroupsStream
-
Constructor Details
-
LDAPRoleMappingsUserDelegate
public LDAPRoleMappingsUserDelegate(RealmModel realm, UserModel user, LDAPObject ldapUser, RoleContainerModel targetRoleContainer)
-
-
Method Details
-
getRealmRoleMappingsStream
Description copied from interface:RoleMapperModelReturns stream of realm roles that are directly set to this object.- Specified by:
getRealmRoleMappingsStreamin interfaceRoleMapperModel- Overrides:
getRealmRoleMappingsStreamin classUserModelDelegate- Returns:
- Stream of
RoleModel. Never returnsnull.
-
getClientRoleMappingsStream
Description copied from interface:RoleMapperModelReturns stream of client roles that are directly set to this object for the given client.- Specified by:
getClientRoleMappingsStreamin interfaceRoleMapperModel- Overrides:
getClientRoleMappingsStreamin classUserModelDelegate- Parameters:
client-ClientModelClient to get the roles for.- Returns:
- Stream of
RoleModel. Never returnsnull.
-
hasRole
Description copied from interface:RoleMapperModelReturnstrueif this object is directly or indirectly assigned the given role,falseotherwise.For example,
trueis returned for hasRole(R) if:- R is directly assigned to this object
- R is indirectly assigned to this object via composites
- R is not assigned to this object but this object belongs to a group G which is assigned the role R
- R is not assigned to this object but this object belongs to a group G, and G belongs to group H which is assigned the role R
- Specified by:
hasRolein interfaceRoleMapperModel- Overrides:
hasRolein classUserModelDelegate- Returns:
- see description
- See Also:
-
grantRole
Description copied from interface:RoleMapperModelGrants the given role to this object.- Specified by:
grantRolein interfaceRoleMapperModel- Overrides:
grantRolein classUserModelDelegate
-
getRoleMappingsStream
Description copied from interface:RoleMapperModelReturns stream of all role (both realm all client) that are directly set to this object.- Specified by:
getRoleMappingsStreamin interfaceRoleMapperModel- Overrides:
getRoleMappingsStreamin classUserModelDelegate- Returns:
- Stream of
RoleModel. Never returnsnull.
-
getLDAPRoleMappingsConverted
-
deleteRoleMapping
Description copied from interface:RoleMapperModelRemoves the given role mapping from this object.- Specified by:
deleteRoleMappingin interfaceRoleMapperModel- Overrides:
deleteRoleMappingin classUserModelDelegate- Parameters:
role- Role to remove
-