public class

CanEditPullRequestCondition

extends Object
implements Condition
java.lang.Object
   ↳ com.atlassian.bitbucket.web.conditions.CanEditPullRequestCondition

Class Overview

Verifies that the current user is allowed to edit the current pull request

Summary

Constants
String PULL_REQUEST
String REPOSITORY
Fields
protected final AuthenticationContext authenticationContext
protected final PermissionService permissionService
Public Constructors
CanEditPullRequestCondition(PermissionService permissionService, AuthenticationContext authenticationContext)
Public Methods
void init(Map<StringString> params)
boolean shouldDisplay(Map<StringObject> context)
Protected Methods
boolean hasEditPermission(Map<StringObject> context)
boolean isAuthorOfPullRequest(Map<StringObject> context)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.plugin.web.Condition

Constants

public static final String PULL_REQUEST

Constant Value: "pullRequest"

public static final String REPOSITORY

Constant Value: "repository"

Fields

protected final AuthenticationContext authenticationContext

protected final PermissionService permissionService

Public Constructors

public CanEditPullRequestCondition (PermissionService permissionService, AuthenticationContext authenticationContext)

Public Methods

public void init (Map<StringString> params)

Throws
PluginParseException

public boolean shouldDisplay (Map<StringObject> context)

Protected Methods

protected boolean hasEditPermission (Map<StringObject> context)

protected boolean isAuthorOfPullRequest (Map<StringObject> context)