Class DefaultSpacePermissionManager

    • Field Detail

    • Method Detail

      • flushCaches

        public void flushCaches()
        Deprecated.
      • removePermission

        @Deprecated
        public void removePermission​(SpacePermission permission)
        Deprecated.
        Removes the specified permission.
        Parameters:
        permission - the permission to remove
      • removeGlobalPermissionForUser

        @Deprecated
        public void removeGlobalPermissionForUser​(ConfluenceUser user,
                                                  String permissionType)
        Deprecated.
        Description copied from interface: SpacePermissionManager
        Removes global permission of specified type that is directly associated with a user, and generates a SpacePermissionsRemoveForUserEvent in the process.
        Parameters:
        user - the user to look up
        permissionType - the permission type to remove
      • removeGlobalPermissionForUser

        public void removeGlobalPermissionForUser​(ConfluenceUser user,
                                                  String permissionType,
                                                  SpacePermissionContext context)
        Deprecated.
        Description copied from interface: SpacePermissionManagerInternal
        Removes global permission of specified type that is directly associated with a user.

        May generate a SpacePermissionsRemoveForUserEvent in the process, depending on the context.

        Parameters:
        user - the user to look up
        permissionType - the permission type to remove
        context - the context for the removal
      • removeAllPermissions

        @Deprecated
        public void removeAllPermissions​(Space space)
        Deprecated.
        Description copied from interface: SpacePermissionManager
        Removes all permissions belonging to space
        Parameters:
        space - The space to remove the permissions for
      • removeAllPermissions

        public void removeAllPermissions​(Space space,
                                         SpacePermissionContext context)
        Deprecated.
        Description copied from interface: SpacePermissionManagerInternal
        Removes all permissions belonging to space
        Parameters:
        space - The space to remove the permissions for
        context - The context for this removal
      • removeAllPermissionsFromDao

        protected void removeAllPermissionsFromDao​(Space space)
        Deprecated.
      • createPrivateSpacePermissions

        public void createPrivateSpacePermissions​(Space space)
        Deprecated.
      • createDefaultSpacePermissions

        public void createDefaultSpacePermissions​(Space space)
        Deprecated.
      • getUsersWithPermissions

        public Collection<com.atlassian.user.User> getUsersWithPermissions​(@Nullable Space space)
        Deprecated.
        Description copied from interface: SpacePermissionManager
        Returns a collection of user objects with VIEWSPACE_PERMISSION in the space. If no space is provided A list of users with USE_CONFLUENCE_PERMISSION will be returned
        Parameters:
        space - - space to query, if null global permissions returned
        Returns:
        Collection of User objects
      • getGroupsWithPermissions

        public Collection<com.atlassian.user.Group> getGroupsWithPermissions​(@Nullable Space space)
        Deprecated.
        Description copied from interface: SpacePermissionManager
        Returns all groups which have permissions in a space or on a global level. If space is null, permissions on the global level will be checked.
        Parameters:
        space - - space to query, if null global permissions returned
        Returns:
        Collection of groups with permissions
      • getUsersForPermissionType

        public Map<String,​Long> getUsersForPermissionType​(String permissionType,
                                                                @Nullable Space space)
        Deprecated.
      • getGroupsForPermissionType

        public Map<String,​Long> getGroupsForPermissionType​(String permissionType,
                                                                 @Nullable Space space)
        Deprecated.
        Returns:
        a map with keys that are String groupNames and values that are Long Group permissionId. The keys in the Map are not case sensitive.
      • permissionExists

        public boolean permissionExists​(SpacePermission permission)
        Deprecated.
        Determines if permission exists in the SpacePermissionDao
        Parameters:
        permission - The SpacePermission object to look up
        Returns:
        true if present, false otherwise
      • savePermissionToDao

        protected void savePermissionToDao​(SpacePermission permission)
        Deprecated.
        Saves the permission to the data store

        This may be overridden to provide caching, where applicable.

        Parameters:
        permission - the SpacePermission to be saved
      • removePermissionFromDao

        protected void removePermissionFromDao​(SpacePermission realPermission)
        Deprecated.
        Removes the permission from the data store

        This may be overridden to provide caching, where applicable

        Parameters:
        realPermission - the SpacePermission to be removed