Class ThreadLocalPermissionsCacheInternal
- java.lang.Object
-
- com.atlassian.confluence.internal.security.ThreadLocalPermissionsCacheInternal
-
public class ThreadLocalPermissionsCacheInternal extends Object
Wrapper around theThreadLocalCache
to deal with caching space permissions and application access.Note the publicly-exposed
Note for this (and allcom.atlassian.confluence.security.ThreadLocalPermissionsCache
(which has become de facto plugin API) calls here. We hide this one so that access to the mutator methods is confined to core: the public one's mutators are deprecated no-ops.ThreadLocalCache
uses) to work,ThreadLocalCache.init()
must be called. Normally this is done byThreadLocalCacheFilter
. In integration tests you'll need to do it manually.- See Also:
com.atlassian.confluence.security.ThreadLocalPermissionsCache
-
-
Constructor Summary
Constructors Constructor Description ThreadLocalPermissionsCacheInternal()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static void
cacheCanUseConfluence(com.atlassian.user.User user, boolean canUse)
Deprecated.since 5.9: only here to support legacycom.atlassian.confluence.security.ThreadLocalPermissionsCache#canUseConfluence(User)
.static void
cachePermissionExemption(com.atlassian.user.User user, boolean exempt)
static void
cacheSpacePermission(com.atlassian.user.User user, String permission, Space space, boolean hasPermission)
static void
cacheUserAccessStatus(@Nullable com.atlassian.user.User user, @NonNull AccessStatus accessStatus)
static Boolean
canUseConfluence(com.atlassian.user.User user)
Deprecated.since 5.9: only here to support legacycom.atlassian.confluence.security.ThreadLocalPermissionsCache#canUseConfluence(User)
.static void
disableTemporaryPermissionExemption()
static void
enableTemporaryPermissionExemption()
static void
flush()
static void
flushUserAccessStatusForAllUsers()
static void
flushUserAccessStatusForUser(@Nullable com.atlassian.user.User user)
static com.atlassian.fugue.Option<AccessStatus>
getUserAccessStatus(com.atlassian.user.User user)
static Boolean
hasPermissionExemption(com.atlassian.user.User user)
static Boolean
hasSpacePermission(String permission, Space space, com.atlassian.user.User user)
static boolean
hasTemporaryPermissionExemption()
-
-
-
Method Detail
-
hasSpacePermission
public static Boolean hasSpacePermission(String permission, Space space, com.atlassian.user.User user)
-
cacheSpacePermission
public static void cacheSpacePermission(com.atlassian.user.User user, String permission, Space space, boolean hasPermission)
-
canUseConfluence
@Deprecated public static Boolean canUseConfluence(com.atlassian.user.User user)
Deprecated.since 5.9: only here to support legacycom.atlassian.confluence.security.ThreadLocalPermissionsCache#canUseConfluence(User)
. UseConfluenceAccessManager.getUserAccessStatus(com.atlassian.user.User)
instead.
-
cacheCanUseConfluence
@Deprecated public static void cacheCanUseConfluence(com.atlassian.user.User user, boolean canUse)
Deprecated.since 5.9: only here to support legacycom.atlassian.confluence.security.ThreadLocalPermissionsCache#canUseConfluence(User)
.
-
getUserAccessStatus
public static com.atlassian.fugue.Option<AccessStatus> getUserAccessStatus(com.atlassian.user.User user)
-
cacheUserAccessStatus
public static void cacheUserAccessStatus(@Nullable com.atlassian.user.User user, @NonNull AccessStatus accessStatus)
-
flushUserAccessStatusForUser
public static void flushUserAccessStatusForUser(@Nullable com.atlassian.user.User user)
-
flushUserAccessStatusForAllUsers
public static void flushUserAccessStatusForAllUsers()
-
flush
public static void flush()
-
hasPermissionExemption
public static Boolean hasPermissionExemption(com.atlassian.user.User user)
-
cachePermissionExemption
public static void cachePermissionExemption(com.atlassian.user.User user, boolean exempt)
-
hasTemporaryPermissionExemption
public static boolean hasTemporaryPermissionExemption()
-
enableTemporaryPermissionExemption
public static void enableTemporaryPermissionExemption()
-
disableTemporaryPermissionExemption
public static void disableTemporaryPermissionExemption()
-
-