Merge "Make ChangeControl#isOwner private"
This commit is contained in:
@@ -315,7 +315,7 @@ public class ChangeControl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Is this user the owner of the change? */
|
/** Is this user the owner of the change? */
|
||||||
boolean isOwner() {
|
private boolean isOwner() {
|
||||||
if (getUser().isIdentifiedUser()) {
|
if (getUser().isIdentifiedUser()) {
|
||||||
Account.Id id = getUser().asIdentifiedUser().getAccountId();
|
Account.Id id = getUser().asIdentifiedUser().getAccountId();
|
||||||
return id.equals(getChange().getOwner());
|
return id.equals(getChange().getOwner());
|
||||||
|
|||||||
@@ -87,7 +87,9 @@ public class RemoveReviewerControl {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// The change owner may remove any zero or positive score.
|
// The change owner may remove any zero or positive score.
|
||||||
if (changeControl.isOwner() && 0 <= value) {
|
if (currentUser.isIdentifiedUser()
|
||||||
|
&& currentUser.getAccountId().equals(notes.getChange().getOwner())
|
||||||
|
&& 0 <= value) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
// Users with the remove reviewer permission, the branch owner, project
|
// Users with the remove reviewer permission, the branch owner, project
|
||||||
|
|||||||
Reference in New Issue
Block a user