Files
gerrit/java/com/google/gerrit/server/edit
Changcheng Xiao 30325c2b7a Move the 'isPatchSetLocked' check out from the ChangeControl
PermissionBackend is supposed to only perform permission
related checks. The 'isPatchSetLocked' check is a patch
set status check to decide whether a change is able to
be rebased, abandoned, etc. It's not permission related
and thus should be moved out from the ChangeControl.

This commit moves the 'isPatchSetLocked' method to the
PatchSetUtil class which looks like the best destination
of this method.

After this move, each time the caller tries to check
the REBASE/ABANDON/RESTORE/ADD_PATCH_SET permission, it
must verify the patch set of the change is not locked. If
it's locked the request should be rejected directly without
checking any further permissions. This commit makes sure
every existing usage has done this prerequest check in
advance.

Change-Id: Ic5cef11228f152cb3f51eea0a7aee100332f263a
2018-05-02 09:46:25 +02:00
..