|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface GateKeeper
Manages the granting of temporary permissions to retrieve resources. It is assumed that all resources managed by a GateKeeper are restricted, with permission being granted for particular users to particular resources. Resources are identified by a path (usually relative to some directory or URI root), the meaning of the path is implementation-dependent.
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.
Method Summary | |
---|---|
void |
addKey(String path,
String userName)
Permit a user to download a particular resource. |
void |
addKey(String path,
com.atlassian.user.User user)
Permit a user to download a particular resource. |
void |
allowAnonymousAccess(String path)
Allow access to a resource for any user, including the anonymous user. |
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. |
Method Detail |
---|
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, String userName)
path
- the path to the resource being made accessibleuserName
- the name of the user being given permissionboolean isAccessPermitted(String path, com.atlassian.user.User user)
path
- the path to the resource being requesteduser
- the user requesting permission to retrieve that resource
boolean isAccessPermitted(String path, String userName)
path
- the path to the resource being requesteduserName
- the name of the user requesting permission to retrieve that resource
void cleanAllKeys()
void allowAnonymousAccess(String path)
path
- the path to the resource being made accessible
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |