Interface UserManager

    • Method Detail

      • assignGroups

        void assignGroups​(String username,
                          Collection<String> groups)
                   throws SecurityManagementException

        Assign a collection of groups to a user.

        .

        All the groups given will be assigned to the user, the current existing assigned ones will be removed.

        It's important to note that the inherited create and update methods should not assign groups, this operations must be done in this method, as it's easier for mapping with the capabilities approach.

        Parameters:
        username - The user identifier.
        groups - The collection of groups identifiers to assign.
        Throws:
        SecurityManagementException
      • assignRoles

        void assignRoles​(String username,
                         Collection<String> roles)
                  throws SecurityManagementException

        Assign a collection of roles to a user.

        .

        All the roles given will be assigned to the user, the current existing assigned ones will be removed.

        It's important to note that the inherited create and update methods should not assign roles, this operations must be done in this method, as it's easier for mapping with the capabilities approach.

        Parameters:
        username - The user identifier.
        roles - The collection of roles identifiers to assign.
        Throws:
        SecurityManagementException