Move "ref_rights" table into Git
Permissions are stored in the project.config file within the
refs/meta/config branch of each project. This makes the rules
more flexible in the future, as well as adds version control.
For example:
[access "refs/*"]
owner = group tools-owners
[access "refs/heads/*"]
label-Verified = -1..+1 group tools-dev
label-Verified = -1..+1 group tools-owners
label-Code-Review = -2..+2 group tools-owners
submit = group tools-dev
submit = group tools-owners
[access "refs/heads/stable"]
exclusiveGroupPermissions = read create push
read = group Anonymous Users
push = group tools-repo-maintainer
To enable easy remote editing of the configuration rules, the
following access block is added by default to -- All Projects --
and is thus inherited throughout the entire site:
[access "refs/meta/config"]
read = group Project Owners
push = group Project Owners
This configuration section permits any project owner or site
administrator (as they are indirectly always a project owner of
any project) to push changes to the project.config file within
the refs/meta/config branch, updating access (and other project
information) remotely without using the web UI.
Change-Id: Idb56f657a4bf88108ad40bbb19d831e6806b68c5
Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
@@ -69,6 +69,18 @@ public abstract class VersionedMetaData {
|
||||
return revision.copy();
|
||||
}
|
||||
|
||||
/** Initialize in-memory as though the repository branch doesn't exist. */
|
||||
public void createInMemory() {
|
||||
try {
|
||||
revision = null;
|
||||
onLoad();
|
||||
} catch (IOException err) {
|
||||
throw new RuntimeException("Unexpected IOException", err);
|
||||
} catch (ConfigInvalidException err) {
|
||||
throw new RuntimeException("Unexpected ConfigInvalidException", err);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Load the current version from the branch.
|
||||
* <p>
|
||||
|
||||
Reference in New Issue
Block a user