Merge changes from topic "group-ref-advertisement"

* changes:
  Grant read access on group branches
  Advertise group refs to group owners
  Advertise refs/users/self if user branch is visible due to Access Database
  Test advertisement of user refs
  VisibleRefFilter: Skip fast advertising of all refs for All-Users
  VisibleRefFilter: Don't treat refs/meta/external-ids as meta ref
This commit is contained in:
Edwin Kempin
2017-11-15 09:00:30 +00:00
committed by Gerrit Code Review
10 changed files with 377 additions and 49 deletions

View File

@@ -144,6 +144,7 @@ public class GroupControl {
return isOwner;
}
// Keep this logic in sync with VisibleRefFilter#isOwner(...).
if (group instanceof GroupDescription.Internal) {
AccountGroup.UUID ownerUUID = ((GroupDescription.Internal) group).getOwnerGroupUUID();
isOwner = getUser().getEffectiveGroups().contains(ownerUUID) || canAdministrateServer();