public interface GateKeeper
Implementations of this interface are responsible for expiring permissions after some reasonable time period
The interface was written to manage access to Confluence's temp directory, from which exports and backups can only be downloaded by the user who created them.
Modifier and Type | Method and Description |
---|---|
void |
addKey(String path,
String userName)
Deprecated.
since 7.19.12 Use addKey with Predicate to recheck permissions.
Permit a user to download a particular resource. This permission is temporary, and may expire after whatever
time period the GateKeeper thinks is reasonable.
|
void |
addKey(String path,
String userName,
Predicate<com.atlassian.user.User> permissionPredicate) |
void |
addKey(String path,
com.atlassian.user.User user)
Deprecated.
since 7.19.12 Use addKey with Predicate to recheck permissions.
Permit a user to download a particular resource. This permission is temporary, and may expire after whatever
time period the GateKeeper thinks is reasonable.
|
void |
addKey(String path,
com.atlassian.user.User user,
Predicate<com.atlassian.user.User> permissionPredicate) |
void |
allowAnonymousAccess(String path)
Deprecated.
since 7.19.12 Use addKey with Predicate to recheck permissions.
Allow access to a resource for any user, including the anonymous user. This permission is temporary, and may
expire after whatever time period the GateKeeper thinks is reasonable.
|
void |
allowAnonymousAccess(String path,
Predicate<com.atlassian.user.User> permissionPredicate) |
void |
cleanAllKeys()
Revoke all granted permissions.
|
boolean |
isAccessPermitted(String path,
String userName)
Determine whether a user is permitted to access a resource.
|
boolean |
isAccessPermitted(String path,
com.atlassian.user.User user)
Determine whether a user is permitted to access a resource.
|
@Deprecated void addKey(String path, com.atlassian.user.User user)
path
- the path to the resource being made accessibleuser
- the user to grant permission for. null
may be used to represent anonymous users.void addKey(String path, com.atlassian.user.User user, Predicate<com.atlassian.user.User> permissionPredicate)
@Deprecated void addKey(String path, String userName)
path
- the path to the resource being made accessibleuserName
- the name of the user being given permissionvoid addKey(String path, String userName, Predicate<com.atlassian.user.User> permissionPredicate)
boolean isAccessPermitted(String path, com.atlassian.user.User user)
path
- the path to the resource being requesteduser
- the user requesting permission to retrieve that resourceboolean isAccessPermitted(String path, String userName)
path
- the path to the resource being requesteduserName
- the name of the user requesting permission to retrieve that resourcevoid cleanAllKeys()
@Deprecated void allowAnonymousAccess(String path)
path
- the path to the resource being made accessibleCopyright © 2003–2023 Atlassian. All rights reserved.
View cookie preferences