Fix message if pushing tag is rejected because tagger is somebody else
Pushing a tag that has somebody else as tagger requires the 'Forge Committer' access right. If this access right is missing Gerrit currently rejects the push with "can not create new references". This error message is misleading because the user may think that the 'Create Reference' access right is missing which is actually assigned. The same reject message is also returned on push of an annotated tag if the 'Push Annotated Tag' access right is missing. Also in this case the error message is not ideal. Go back to the old more generic message which says 'prohibited by Gerrit'. This error message is at least explained in the Gerrit documentation so that the user can find out the reason. The new error message is not documented. Describe the missing case in the 'prohibited by Gerrit' error documentation if pushing a tag fails because the tagger is somebody else and the 'Forge Committer' access right is not assigned. Change-Id: Ib2e20bbc5f1c7d47e93fc0b2c5fecfa86908419e Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
parent
f8a958b891
commit
6ae9b21932
@ -19,6 +19,9 @@ In particular this error occurs:
|
|||||||
access right on 'refs/tags/*'
|
access right on 'refs/tags/*'
|
||||||
4. if you push a lightweight tag without the access right link:access-control.html#category_create['Create
|
4. if you push a lightweight tag without the access right link:access-control.html#category_create['Create
|
||||||
Reference'] for the reference name 'refs/tags/*'
|
Reference'] for the reference name 'refs/tags/*'
|
||||||
|
5. if you push a tag with somebody else as tagger and you don't have the
|
||||||
|
link:access-control.html#category_forge_committer['Forge Committer']
|
||||||
|
access right for the reference name 'refs/tags/*'
|
||||||
|
|
||||||
For new users it often happens that they accidentally try to bypass
|
For new users it often happens that they accidentally try to bypass
|
||||||
code review. The push then fails with the error message 'prohibited
|
code review. The push then fails with the error message 'prohibited
|
||||||
|
@ -837,7 +837,7 @@ public class ReceiveCommits {
|
|||||||
batch.addCommand(cmd);
|
batch.addCommand(cmd);
|
||||||
} else {
|
} else {
|
||||||
errors.put(Error.CREATE, ctl.getRefName());
|
errors.put(Error.CREATE, ctl.getRefName());
|
||||||
reject(cmd, "can not create new references");
|
reject(cmd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user