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:
@@ -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? */
|
||||
|
||||
Reference in New Issue
Block a user