Interface UserGroupEx

    • Method Detail

      • addParent

        void addParent​(@NotNull
                       UserGroup parent)
        Adds the parent group.

        Do not call this method directly! It should be consistent with addSubgroup.

        Parameters:
        parent - the parent to add
      • removeParent

        void removeParent​(@NotNull
                          UserGroup parent)
        Removes the parent group.

        Do not call this method directly! It should be consistent with removeSubgroup.

        Parameters:
        parent - the parent to remove
      • hasParents

        boolean hasParents()
        Returns whether this group has parent groups. Using this method is faster than !getParentGroups().isEmpty()
        Returns:
        true if this group has parent groups
      • getUsersNumber

        int getUsersNumber()
        Returns the number of (direct) users in this group. Much more effective than getDirectUsers().size().
        Returns:
        the number of users in the group
      • dispose

        void dispose()
        Removes all users, subgroups, etc from the group (and from DB).

        Useful when the group is deleted.

      • calculatePermissions

        void calculatePermissions​(@NotNull
                                  BitSet globalPerms,
                                  @NotNull
                                  Map<String,​Permissions> projectPerms)
        Calculates the permissions of this user group and fills globalPerms and projectPerms with results.
        Parameters:
        globalPerms - will contain global permissions
        projectPerms - will contain project permissions
      • isAllUsersGroup

        boolean isAllUsersGroup()
        Returns true, if the specified group is the all-users group.
        Parameters:
        group - the group to check
        Returns:
        true if the specified group is the all-users group, false otherwise
        Since:
        9.0
      • updateInfo

        void updateInfo()
        Reload main group info (name and description) from the database
      • updateProperties

        void updateProperties()
        Reload group properties from the database
      • updateUsers

        void updateUsers()
        Reload group users from the database
      • updateRoles

        void updateRoles()
        Reload group roles from the database
      • updateSubgroups

        void updateSubgroups()
        Reload group direct subgroups from the database
      • resetRoles

        void resetRoles()
        Resets internal roles cache
      • cleanupGroup

        void cleanupGroup()
        Removes from the group users, which were removed on the server
        Since:
        2023.11