public class RefControl
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
boolean |
canAbandon() |
boolean |
canAddPatchSet() |
boolean |
canCreate(com.google.gerrit.reviewdb.server.ReviewDb db,
org.eclipse.jgit.lib.Repository repo,
org.eclipse.jgit.revwalk.RevObject object)
Determines whether the user can create a new Git ref.
|
boolean |
canDelete()
Determines whether the user can delete the Git ref controlled by this
object.
|
boolean |
canDeleteDrafts() |
boolean |
canEditHashtags() |
boolean |
canEditTopicName() |
boolean |
canForceEditTopicName() |
boolean |
canForceUpdate() |
boolean |
canForgeAuthor() |
boolean |
canForgeCommitter() |
boolean |
canForgeGerritServerIdentity() |
boolean |
canPublishDrafts() |
boolean |
canRead() |
boolean |
canRebase() |
boolean |
canRemoveReviewer() |
boolean |
canSubmit() |
boolean |
canSubmitAs() |
boolean |
canUpdate() |
boolean |
canUpload()
Determines whether the user can upload a change to the ref controlled by
this object.
|
boolean |
canUploadMerges() |
boolean |
canViewDrafts() |
boolean |
canWrite() |
RefControl |
forUser(CurrentUser who) |
java.util.List<com.google.gerrit.common.data.PermissionRange> |
getLabelRanges(boolean isChangeOwner)
All value ranges of any allowed label permission.
|
ProjectControl |
getProjectControl() |
com.google.gerrit.common.data.PermissionRange |
getRange(java.lang.String permission)
The range of permitted values associated with a label permission.
|
com.google.gerrit.common.data.PermissionRange |
getRange(java.lang.String permission,
boolean isChangeOwner)
The range of permitted values associated with a label permission.
|
java.lang.String |
getRefName() |
CurrentUser |
getUser() |
boolean |
isBlocked(java.lang.String permissionName)
True if the user is blocked from using this permission.
|
boolean |
isOwner()
Is this user a ref owner?
|
boolean |
isVisible()
Can this user see this reference exists?
|
boolean |
isVisibleByRegisteredUsers()
True if this reference is visible by all REGISTERED_USERS
|
public java.lang.String getRefName()
public ProjectControl getProjectControl()
public CurrentUser getUser()
public RefControl forUser(CurrentUser who)
public boolean isOwner()
public boolean isVisible()
public boolean isVisibleByRegisteredUsers()
public boolean canUpload()
true
if the user specified can upload a change to the Git
refpublic boolean canAddPatchSet()
public boolean canUploadMerges()
public boolean canRebase()
public boolean canSubmit()
public boolean canSubmitAs()
public boolean canUpdate()
public boolean canForceUpdate()
public boolean canWrite()
public boolean canRead()
public boolean canCreate(com.google.gerrit.reviewdb.server.ReviewDb db, org.eclipse.jgit.lib.Repository repo, org.eclipse.jgit.revwalk.RevObject object)
db
- db for checking change visibility.repo
- repository on which user want to createobject
- the object the user will start the reference with.true
if the user specified can create a new Git refpublic boolean canDelete()
true
if the user specified can delete a Git ref.public boolean canForgeAuthor()
public boolean canForgeCommitter()
public boolean canForgeGerritServerIdentity()
public boolean canAbandon()
public boolean canRemoveReviewer()
public boolean canViewDrafts()
public boolean canPublishDrafts()
public boolean canDeleteDrafts()
public boolean canEditTopicName()
public boolean canEditHashtags()
public boolean canForceEditTopicName()
public java.util.List<com.google.gerrit.common.data.PermissionRange> getLabelRanges(boolean isChangeOwner)
public com.google.gerrit.common.data.PermissionRange getRange(java.lang.String permission)
public com.google.gerrit.common.data.PermissionRange getRange(java.lang.String permission, boolean isChangeOwner)
public boolean isBlocked(java.lang.String permissionName)