Files
gerrit/gerrit-server/src/main/java/com/google
Alice Kober-Sotzek 20e1071273 Allow rebase of a change only with push permission
A manual rebase (via Git only) requires a user to have push
permission for the respective branch. Even though users who can
perform a rebase on a Gerrit change (like the owner or submitters) may
have push permission most of the time, we can't be absolutely sure.
For instance, an owner might have had push permission when creating the
change but the permission was revoked later on. In addition, someone
who was granted the 'canRebase' permission might not have push
permission for all branches. For this reason, we additionally check
whether the user who requests a rebase may upload new commits to the
respective branch.

This puts 'canRebase' in line with 'canAddPatchSet', 'canMoveTo', and
'canRestore', which always check for push permission (even for owners).

Change-Id: If06f516fc5aef5e2fe32b537dc0e02fb8922800a
2017-05-10 16:53:33 +02:00
..