public class ThreadLocalPermissionsCacheInternal extends Object
ThreadLocalCache
to deal with caching space permissions and application access.
Note the publicly-exposed 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 by ThreadLocalCacheFilter
.
In integration tests you'll need to do it manually.ThreadLocalPermissionsCache
Constructor and Description |
---|
ThreadLocalPermissionsCacheInternal() |
Modifier and Type | Method and Description |
---|---|
static void |
cacheCanUseConfluence(com.atlassian.user.User user,
boolean canUse)
Deprecated.
since 5.9: only here to support legacy
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(com.atlassian.user.User user,
AccessStatus accessStatus) |
static Boolean |
canUseConfluence(com.atlassian.user.User user)
Deprecated.
since 5.9: only here to support legacy
ThreadLocalPermissionsCache.canUseConfluence(User) .
Use ConfluenceAccessManager.getUserAccessStatus(com.atlassian.user.User) instead. |
static void |
disableTemporaryPermissionExemption() |
static void |
enableTemporaryPermissionExemption() |
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() |
public static Boolean hasSpacePermission(String permission, Space space, com.atlassian.user.User user)
public static void cacheSpacePermission(com.atlassian.user.User user, String permission, Space space, boolean hasPermission)
@Deprecated public static Boolean canUseConfluence(com.atlassian.user.User user)
ThreadLocalPermissionsCache.canUseConfluence(User)
.
Use ConfluenceAccessManager.getUserAccessStatus(com.atlassian.user.User)
instead.@Deprecated public static void cacheCanUseConfluence(com.atlassian.user.User user, boolean canUse)
ThreadLocalPermissionsCache.canUseConfluence(User)
.public static com.atlassian.fugue.Option<AccessStatus> getUserAccessStatus(com.atlassian.user.User user)
public static void cacheUserAccessStatus(@Nullable com.atlassian.user.User user, @Nonnull AccessStatus accessStatus)
public static Boolean hasPermissionExemption(com.atlassian.user.User user)
public static void cachePermissionExemption(com.atlassian.user.User user, boolean exempt)
public static boolean hasTemporaryPermissionExemption()
public static void enableTemporaryPermissionExemption()
public static void disableTemporaryPermissionExemption()
Copyright © 2003–2016 Atlassian. All rights reserved.