Remove project state check from ChangeControl#addPatchSet
All callers are already explicitly checking for the project state so there is no need to perform the check implicitly once more. Change-Id: I956eddb1647778454293a47bfee5459952783b17
This commit is contained in:
@@ -176,9 +176,7 @@ class ChangeControl {
|
||||
|
||||
/** Can this user add a patch set to this change? */
|
||||
private boolean canAddPatchSet(ReviewDb db) throws OrmException {
|
||||
if (!(refControl.asForRef().testOrFalse(RefPermission.CREATE_CHANGE)
|
||||
&& getProjectControl().getProjectState().statePermitsWrite())
|
||||
|| isPatchSetLocked(db)) {
|
||||
if (!(refControl.asForRef().testOrFalse(RefPermission.CREATE_CHANGE)) || isPatchSetLocked(db)) {
|
||||
return false;
|
||||
}
|
||||
if (isOwner()) {
|
||||
|
||||
Reference in New Issue
Block a user