Class GrantingUserPermissionService

  • All Implemented Interfaces:
    UserPermissionService

    public class GrantingUserPermissionService
    extends java.lang.Object
    implements UserPermissionService
    This permission helper implementation is the default one in the IDM module and is granting all permissions to all users for user management. Override it in order to check permissions on user management actions.
    Author:
    Micha Kiener
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      java.util.Optional<java.lang.String> checkUserCreation​(java.lang.String userId, java.lang.String userToCreateId)
      Deprecated.
      java.util.Optional<java.lang.String> checkUserCreation​(java.lang.String userId, java.util.Collection<java.lang.String> userGroupKeys, java.lang.String userTenantId, java.lang.String userToCreateId)
      Evaluates the permissions for the given user when creating a new user.
      java.util.Optional<java.lang.String> checkUserDeactivation​(java.lang.String userId, java.lang.String userToDeactivateId)
      Deprecated.
      java.util.Optional<java.lang.String> checkUserDeactivation​(java.lang.String userId, java.util.Collection<java.lang.String> userGroupKeys, java.lang.String userTenantId, java.lang.String userToDeactivateId)
      Evaluates the permissions for the given user when deactivating a user.
      java.util.Optional<java.lang.String> checkUserReactivation​(java.lang.String userId, java.lang.String userToReactivateId)
      Evaluates the permissions for the given user when reactivating a user.
      java.util.Optional<java.lang.String> checkUserReactivation​(java.lang.String userId, java.util.Collection<java.lang.String> userGroupKeys, java.lang.String userTenantId, java.lang.String userToReactivateId)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GrantingUserPermissionService

        public GrantingUserPermissionService()
    • Method Detail

      • checkUserCreation

        @Deprecated
        public java.util.Optional<java.lang.String> checkUserCreation​(java.lang.String userId,
                                                                      java.lang.String userToCreateId)
        Deprecated.
        Description copied from interface: UserPermissionService
        Evaluates the permissions for the given user when creating a new user.
        Specified by:
        checkUserCreation in interface UserPermissionService
        Parameters:
        userId - the id of the user to check the permissions for (not the one being deactivated)
        userToCreateId - the id of the new user to be created
        Returns:
        the permission error message, if permission is denied to create the user or no message, if permission is granted
      • checkUserCreation

        public java.util.Optional<java.lang.String> checkUserCreation​(java.lang.String userId,
                                                                      java.util.Collection<java.lang.String> userGroupKeys,
                                                                      java.lang.String userTenantId,
                                                                      java.lang.String userToCreateId)
        Description copied from interface: UserPermissionService
        Evaluates the permissions for the given user when creating a new user.
        Specified by:
        checkUserCreation in interface UserPermissionService
        Parameters:
        userId - the id of the user to check the permissions for (not the one being deactivated)
        userGroupKeys - the group keys of the user to check the permissions
        userTenantId - the tenant id of the user to check the permissions
        userToCreateId - the id of the new user to be created
        Returns:
        the permission error message, if permission is denied to create the user or no message, if permission is granted
      • checkUserDeactivation

        @Deprecated
        public java.util.Optional<java.lang.String> checkUserDeactivation​(java.lang.String userId,
                                                                          java.lang.String userToDeactivateId)
        Deprecated.
        Description copied from interface: UserPermissionService
        Evaluates the permissions for the given user when deactivating a user.
        Specified by:
        checkUserDeactivation in interface UserPermissionService
        Parameters:
        userId - the id of the user to check the permissions for (not the one being deactivated)
        userToDeactivateId - the id of the user to be deactivated
        Returns:
        the permission error message, if permission is denied to deactivate the user or no message, if permission is granted
      • checkUserDeactivation

        public java.util.Optional<java.lang.String> checkUserDeactivation​(java.lang.String userId,
                                                                          java.util.Collection<java.lang.String> userGroupKeys,
                                                                          java.lang.String userTenantId,
                                                                          java.lang.String userToDeactivateId)
        Description copied from interface: UserPermissionService
        Evaluates the permissions for the given user when deactivating a user.
        Specified by:
        checkUserDeactivation in interface UserPermissionService
        Parameters:
        userId - the id of the user to check the permissions for (not the one being deactivated)
        userGroupKeys - the group keys of the user to check the permissions
        userTenantId - the tenant id of the user to check the permissions
        userToDeactivateId - the id of the user to be deactivated
        Returns:
        the permission error message, if permission is denied to deactivate the user or no message, if permission is granted
      • checkUserReactivation

        public java.util.Optional<java.lang.String> checkUserReactivation​(java.lang.String userId,
                                                                          java.lang.String userToReactivateId)
        Description copied from interface: UserPermissionService
        Evaluates the permissions for the given user when reactivating a user.
        Specified by:
        checkUserReactivation in interface UserPermissionService
        Parameters:
        userId - the id of the user to check the permissions for (not the one being reactivated)
        userToReactivateId - the id of the user to be reactivated
        Returns:
        the permission error message, if permission is denied to reactivate the user or no message, if permission is granted
      • checkUserReactivation

        public java.util.Optional<java.lang.String> checkUserReactivation​(java.lang.String userId,
                                                                          java.util.Collection<java.lang.String> userGroupKeys,
                                                                          java.lang.String userTenantId,
                                                                          java.lang.String userToReactivateId)
        Specified by:
        checkUserReactivation in interface UserPermissionService