Class UserGroupService

java.lang.Object
org.imixs.marty.security.UserGroupService

@DeclareRoles("org.imixs.ACCESSLEVEL.MANAGERACCESS") @RunAs("org.imixs.ACCESSLEVEL.MANAGERACCESS") public class UserGroupService extends Object
user Group service to provide method for managing user and groups settings.
Author:
rsoika
  • Field Details

    • ACCESSLEVEL_NOACCESS

      public static String ACCESSLEVEL_NOACCESS
    • DEFAULT_ACCOUNT

      public static String DEFAULT_ACCOUNT
    • DEFAULT_PASSWORD

      public static String DEFAULT_PASSWORD
    • CORE_GROUPS

      public static final String[] CORE_GROUPS
    • DEPRECATED_CORE_GROUPS

      public static final String[] DEPRECATED_CORE_GROUPS
  • Constructor Details

    • UserGroupService

      public UserGroupService()
  • Method Details

    • updateUser

      public void updateUser(org.imixs.workflow.ItemCollection profile)
      This method verifies the profile data and creates or update the corresponding user entries in the user tables.

      NOTE: this method did not change a userid. To do this use the method changeUser!

      The Method also verifies deprecated role names, fix it and prints out a warning in such a case.

      If a new userId entity is generated but no password is provided, the method generates an encrypted random password

      Parameters:
      profile -
    • changeUserId

      public void changeUserId(String oldID, String newID)
      This method changes the userID of an existing user entry and updates the userGroup table entries.
      Parameters:
      oldID - - the existing userEntry
      newID - - the name of the new id
    • removeUserId

      public void removeUserId(String userID)
      This method deletes the userID of an existing user entry and also the userGroup table entries.
      Parameters:
      userID - - the existing userEntry
    • initUserIDs

      public void initUserIDs()
      This method verifies if a default user id already exists. If no userID exists the method generates a default account 'admin' with password 'adminadmin'
      Throws:
      org.imixs.workflow.exceptions.AccessDeniedException
    • migrateDeprecatedUserRoles

      public void migrateDeprecatedUserRoles()
      This method migrates deprecated user roles

      • IMIXS-WORKFLOW-Manager => org.imixs.ACCESSLEVEL.MANAGERACCESS
      • IMIXS-WORKFLOW-Editor => org.imixs.ACCESSLEVEL.EDITORACCESS
      • IMIXS-WORKFLOW-Author => org.imixs.ACCESSLEVEL.AUTHORACCESS
      • IMIXS-WORKFLOW-Reader => org.imixs.ACCESSLEVEL.READERACCESS

        First the method tests if a migration is necessary. For that the method tests if the new roles already are existing in the system. Only if not the migration is started

        This method can be removed in later versions (but it may need some time)

    • getDeprecatedGroupName

      public String getDeprecatedGroupName(String newGroupName)
      Returns the deprecated group name for a given core group name
      • IMIXS-WORKFLOW-Manager => org.imixs.ACCESSLEVEL.MANAGERACCESS
      • IMIXS-WORKFLOW-Editor => org.imixs.ACCESSLEVEL.EDITORACCESS
      • IMIXS-WORKFLOW-Author => org.imixs.ACCESSLEVEL.AUTHORACCESS
      • IMIXS-WORKFLOW-Reader => org.imixs.ACCESSLEVEL.READERACCESS

      Parameters:
      newGroupName -
      Returns:
    • getCoreGroupName

      public String getCoreGroupName(String deprecatedGroupName)
      Returns the core group name for a given deprecated group name
      Parameters:
      deprecatedGroupName -
      Returns: