java.lang.Object | |
↳ | com.atlassian.confluence.security.DownloadGateKeeper |
GateKeeper for the Confluence downloads directory.
Any resource granted permissions for will be normalised to remove any part of the path before the first
occurrence of the text download
. So /confluence/download/foo.txt
will need to be checked
as download/foo.txt
. Attempts to grant permission to a path that doesn't contain "download" will throw
an exception.
Permissions will be expired 24 hours after they are granted.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Add permission for a user to access a certain path.
| |||||||||||
Permit a user to download a particular resource.
| |||||||||||
Allow all users, including the anonymous user, access to a particular path.
| |||||||||||
Revoke all granted permissions.
| |||||||||||
Determine whether a user is permitted to access a resource.
| |||||||||||
Determine whether a user is permitted to access a resource.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
com.atlassian.confluence.security.GateKeeper
|
Add permission for a user to access a certain path. The path will be normalised on the way in so that
anything before the text "download' is discarded. So /confluence/download/Foo
will be
normalised to download/Foo
. If the text "download" does not appear in the path, an exception
will be thrown
path | the path being granted permission to. Must not be null. |
---|---|
username | the username of the user to be permitted. null represents the name of
the anonymous users. |
IllegalArgumentException | if the path is not of the expected form |
---|
Permit a user to download a particular resource. This permission is temporary, and may expire after whatever time period the GateKeeper thinks is reasonable.
path | the path to the resource being made accessible |
---|---|
user | the user to grant permission for. null may be used to represent anonymous users.
|
Allow all users, including the anonymous user, access to a particular path. The path will be normalised to
the same rules as addKey(String, User)
path | The resource to grant access permission to |
---|
Revoke all granted permissions.
Determine whether a user is permitted to access a resource.
path | the path to the resource being requested |
---|---|
user | the user requesting permission to retrieve that resource |
Determine whether a user is permitted to access a resource.
path | the path to the resource being requested |
---|---|
userName | the name of the user requesting permission to retrieve that resource |