public class IsPersonalProjectCondition extends Object implements com.atlassian.plugin.web.Condition
personal
.
By default, any personal project
will match this condition. Setting the
onlyMine
parameter to true
restricts the condition to only return true
if the project
is the current user's personal project
.
Modifier and Type | Field and Description |
---|---|
static String |
ONLY_MINE |
static String |
PROJECT |
Constructor and Description |
---|
IsPersonalProjectCondition(com.atlassian.bitbucket.auth.AuthenticationContext authenticationContext) |
Modifier and Type | Method and Description |
---|---|
void |
init(Map<String,String> params)
Parses parameters for this condition.
|
boolean |
shouldDisplay(Map<String,Object> context)
Retrieves a flag indicating whether the project, which is expected to be present in the provided
context
under the key "project" , is a personal project. |
public static final String PROJECT
public static final String ONLY_MINE
public IsPersonalProjectCondition(com.atlassian.bitbucket.auth.AuthenticationContext authenticationContext)
public void init(Map<String,String> params)
onlyMine
: true
if the condition should only match the current user's personal project;
false
if all personal project should match (Default: false
)init
in interface com.atlassian.plugin.web.Condition
params
- configuration parameters for this conditionpublic boolean shouldDisplay(Map<String,Object> context)
context
under the key "project"
, is a personal project.
If onlyMine
is set to true
, project must not only be personal
but
must belong to the current user.
shouldDisplay
in interface com.atlassian.plugin.web.Condition
context
- the context containing the projecttrue
if the project is personal (optionally further restricted to only the current user);
otherwise, false
Copyright © 2021 Atlassian. All rights reserved.