Package com.google.gerrit.server.project
Class RemoveReviewerControl
- java.lang.Object
-
- com.google.gerrit.server.project.RemoveReviewerControl
-
public class RemoveReviewerControl extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkRemoveReviewer(ChangeNotes notes, CurrentUser currentUser, Account.Id reviewer)
Checks if removing the given reviewer is OK.void
checkRemoveReviewer(ChangeNotes notes, CurrentUser currentUser, PatchSetApproval approval)
Checks if removing the given reviewer and patch set approval is OK.boolean
testRemoveReviewer(ChangeNotes notes, CurrentUser currentUser, Account.Id reviewer, int value)
Returns true if the user is allowed to remove this reviewer.boolean
testRemoveReviewer(ChangeNotes notes, CurrentUser currentUser, PatchSetApproval approval)
Returns true if the user is allowed to remove this reviewer.boolean
testRemoveReviewer(ChangeData cd, CurrentUser currentUser, Account.Id reviewer, int value)
Returns true if the user is allowed to remove this reviewer.
-
-
-
Method Detail
-
checkRemoveReviewer
public void checkRemoveReviewer(ChangeNotes notes, CurrentUser currentUser, PatchSetApproval approval) throws PermissionBackendException, AuthException
Checks if removing the given reviewer and patch set approval is OK.- Throws:
AuthException
- if this user is not allowed to remove this approval.PermissionBackendException
- on failure of permission checks.
-
checkRemoveReviewer
public void checkRemoveReviewer(ChangeNotes notes, CurrentUser currentUser, Account.Id reviewer) throws PermissionBackendException, AuthException
Checks if removing the given reviewer is OK. Does not check if removing any approvals the reviewer might have given is OK.- Throws:
AuthException
- if this user is not allowed to remove this approval.PermissionBackendException
- on failure of permission checks.
-
testRemoveReviewer
public boolean testRemoveReviewer(ChangeNotes notes, CurrentUser currentUser, PatchSetApproval approval) throws PermissionBackendException
Returns true if the user is allowed to remove this reviewer.- Throws:
PermissionBackendException
-
testRemoveReviewer
public boolean testRemoveReviewer(ChangeNotes notes, CurrentUser currentUser, Account.Id reviewer, int value) throws PermissionBackendException
Returns true if the user is allowed to remove this reviewer.- Throws:
PermissionBackendException
-
testRemoveReviewer
public boolean testRemoveReviewer(ChangeData cd, CurrentUser currentUser, Account.Id reviewer, int value) throws PermissionBackendException
Returns true if the user is allowed to remove this reviewer.- Throws:
PermissionBackendException
-
-