Files
gerrit/java/com/google/gerrit
Changcheng Xiao a0ef8f6095 CreateChange: add a visibility check for the target branch
Currently, it's possible for a user to create a change on a branch
they can't see. When this happens, the created change is not
accessible by the user (WAI) but this gives the user a way to probe
whether a branch exists or not.

This commit fixes this issue by adding a "READ" permisssion check for
the input branch and verifies that if the user doesn't have permission
to see the target branch, we always return 404 no matter the branch
exists or not.

BTW, the existing #createChangeOnInvisibleBranchFails test failed
to catch up this because the 404 it verifies is thrown by
the java API ChangesImpl#create when it tries to create a ChangeInfo
for the created change.

Change-Id: I5c8e3334e37b7215c86c08c5172a8e3b4a69d0c6
2019-01-25 09:27:28 +01:00
..
2019-01-21 14:53:00 +09:00
2019-01-24 09:18:43 +01:00
2019-01-21 14:53:00 +09:00