Class AbstractSpacePermissionManager

    • Method Detail

      • hasPermission

        public final boolean hasPermission​(String permissionType,
                                           @Nullable Space space,
                                           @Nullable com.atlassian.user.User remoteUser)
        Deprecated.
        Description copied from interface: SpacePermissionManager
        Determines if remoteUser has the given permission in space

        Unless you're writing code that is part of the permission checking implementation, or you're changing space permissions, you should be using PermissionManager instead.

        Specified by:
        hasPermission in interface SpacePermissionManager
        Parameters:
        permissionType - The permission type to look up
        space - The space the permission applies to (can be null for global permissions)
        remoteUser - The user to look up (can be null for the anonymous user)
        Returns:
        true if remoteUser has the permission, false otherwise
      • hasAllPermissions

        public final boolean hasAllPermissions​(List<String> permissionTypes,
                                               @Nullable Space space,
                                               @Nullable com.atlassian.user.User user)
        Deprecated.
        Description copied from interface: SpacePermissionManager
        Determines if remoteUser has all of the given permissions in space

        If remoteUser lacks any of the given permissions, false is returned.

        Unless you're writing code that is part of the permission checking implementation, or you're changing space permissions, you should be using PermissionManager instead.

        Specified by:
        hasAllPermissions in interface SpacePermissionManager
        Parameters:
        permissionTypes - A List of permission types (see SpacePermission) to check
        space - The space the permissions apply to
        user - The user to look up
        Returns:
        true if remoteUser has the permission, false otherwise
      • groupHasPermission

        public boolean groupHasPermission​(String permissionType,
                                          @Nullable Space space,
                                          String group)
        Deprecated.
        Description copied from interface: SpacePermissionManager
        Checks whether the given group has the given permission

        If a null space is specified, this method looks up matching global permissions, otherwise space's permissions list is queried to see if the permission matches.

        Similarly, if permissionType is not a space permission, a matching global permission is looked up.

        Specified by:
        groupHasPermission in interface SpacePermissionManager
        Parameters:
        permissionType - The permission type to look up
        space - The space the permission applies to (can be null for global permissions)
        group - The group to look up the permission for
        Returns:
        true if the group has the required permission, false otherwise
      • getGroupNamesWithPermission

        protected abstract Iterable<String> getGroupNamesWithPermission​(@Nullable Space targetSpace,
                                                                        String permissionType)
        Deprecated.
      • getDefaultGlobalPermissions

        public Set<SpacePermission> getDefaultGlobalPermissions()
        Deprecated.
        Description copied from interface: SpacePermissionManager
        Returns the default global permissions that are created when Confluence is set up. These will exist in a newly set up system but may be removed afterwards. Note that the returned objects are freshly created and therefore do not have IDs or other persistence data.

        By default, confluence-administrators group has admin access, the default confluence users group can view the system and anonymous access is disabled.

        Specified by:
        getDefaultGlobalPermissions in interface SpacePermissionManager
        Returns:
        a collection of SpacePermissions.
      • getUserAccessor

        protected UserAccessor getUserAccessor()
        Deprecated.
      • getAccessModeManager

        protected AccessModeManager getAccessModeManager()
        Deprecated.
      • isPermittedInReadOnlyAccessMode

        public boolean isPermittedInReadOnlyAccessMode​(String permissionType)
        Deprecated.
        Description copied from interface: SpacePermissionManager
        Check if the permission type is permitted in read only access mode
        Specified by:
        isPermittedInReadOnlyAccessMode in interface SpacePermissionManager
        Parameters:
        permissionType - the permission type to be checked
        Returns:
        true if the permission type is permitted in read only access mode