Fix access for site administrators

They didn't have ownership over refs/* in any project, unless it
was otherwise somehow already granted to them through an OWN rule.

Change-Id: I59240a6fa6f1506f6c006c8c6b6b0ed1991c5439
Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
Shawn O. Pearce
2010-07-15 12:30:31 -07:00
parent 6d6d451ce6
commit 72fc9bb5a8

View File

@@ -109,13 +109,12 @@ public class RefControl {
// calls us to find out if there is ownership of all references in
// order to determine project level ownership.
//
if (!getRefName().equals(
RefRight.ALL.substring(0, RefRight.ALL.length() - 1))
&& getProjectControl().isOwner()) {
return true;
if (getRefName().equals(
RefRight.ALL.substring(0, RefRight.ALL.length() - 1))) {
return getCurrentUser().isAdministrator();
} else {
return getProjectControl().isOwner();
}
return false;
}
/** Can this user see this reference exists? */