java.lang.Object |
↳ |
com.atlassian.plugin.webresource.condition.SimpleUrlReadingCondition |
|
↳ |
com.atlassian.bitbucket.web.conditions.HasGlobalPermissionUrlReadingCondition |
Class Overview
Verifies that the current user has a global permission as an com.atlassian.plugin.webresource.condition.UrlReadingCondition.
This condition should be used only in web-resources when required to be combined with other com.atlassian.plugin.webresource.condition.UrlReadingConditions.
<condition class="com.atlassian.bitbucket.web.conditions.HasGlobalPermissionUrlReadingCondition">
<param name="permission">ADMIN</param>
</condition>
Summary
Public Methods |
void
|
init(Map<String, String> params)
Retrieves the #PERMISSION permission from the context.
|
[Expand]
Inherited Methods |
From class
com.atlassian.plugin.webresource.condition.SimpleUrlReadingCondition
void
|
addToUrl(UrlBuilder arg0, Coordinate arg1)
|
void
|
addToUrl(UrlBuilder arg0)
|
Dimensions
|
computeDimensions()
|
void
|
init(Map<String, String> arg0)
|
abstract
boolean
|
isConditionTrue()
|
abstract
String
|
queryKey()
|
boolean
|
shouldDisplay(QueryParams arg0)
|
|
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
From interface
com.atlassian.plugin.webresource.condition.UrlReadingCondition
void
|
addToUrl(UrlBuilder arg0)
|
void
|
init(Map<String, String> arg0)
|
boolean
|
shouldDisplay(QueryParams arg0)
|
|
From interface
com.atlassian.webresource.api.prebake.DimensionAwareUrlReadingCondition
void
|
addToUrl(UrlBuilder arg0, Coordinate arg1)
|
Dimensions
|
computeDimensions()
|
|
Public Constructors
public
HasGlobalPermissionUrlReadingCondition
(PermissionService permissionService)
Constructs a new HasGlobalPermissionUrlReadingCondition
which will perform checks using the specified
PermissionService
.
Parameters
permissionService
| the service to use when performing the permission check
|
Public Methods
public
void
init
(Map<String, String> params)
Retrieves the #PERMISSION permission from the context. The global
flag of the
parsed permission is validated to ensure the Permission
is global.
Parameters
params
| the initialisation context |
Throws
PluginParseException
| Thrown if no #PERMISSION permission is set, or if the set value is not a
valid Permission , or the permission's global
flag does not match the required value.
|
Protected Methods
protected
boolean
isConditionTrue
()
protected
String
queryKey
()