From 5d7545652a6529c9076f67acd75f7a977c8a44a6 Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Wed, 10 Oct 2012 16:47:11 -0400
Subject: [PATCH] Try regex permission matching if exact permission is not found (issue 36)

---
 docs/01_setup.mkd |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/docs/01_setup.mkd b/docs/01_setup.mkd
index 1cebb3b..3123aa1 100644
--- a/docs/01_setup.mkd
+++ b/docs/01_setup.mkd
@@ -234,7 +234,7 @@
 	    federationSets = 
 
 #### Repository Names
-Repository names must be unique and are CASE-SENSITIVE ON CASE-SENSITIVE FILESYSTEMS.  The name must be composed of letters, digits, or `/ _ - .`<br/>
+Repository names must be unique and are CASE-SENSITIVE ON CASE-SENSITIVE FILESYSTEMS.  The name must be composed of letters, digits, or `/ _ - . ~`<br/>
 Whitespace is illegal.
 
 Repositories can be grouped within subfolders.  e.g. *libraries/mycoollib.git* and *libraries/myotherlib.git*
@@ -257,6 +257,16 @@
 - **RWC** (clone and push with ref creation)
 - **RWD** (clone and push with ref creation, deletion)
 - **RW+** (clone and push with ref creation, deletion, rewind)
+
+These permission codes are combined with the repository path to create a user permission:
+
+    RW:mygroup/myrepo.git
+
+#### Discrete Permissions with Regex Matching (Gitblit v1.2.0+)
+
+Gitblit also supports regex matching for repository permissions.  The following permission grants push privileges to all repositories in the *mygroup* folder.
+
+    RW:mygroup/[A-Za-z0-9-~_\\./]+
 
 #### No-So-Discrete Permissions (Gitblit <= v1.1.0)
 
@@ -282,6 +292,7 @@
 	[user "hannibal"]
 		password = bossman
 		repository = RWD:topsecret.git
+		repository = RW+:ateam/[A-Za-z0-9-~_\\./]+
 
 	[user "faceman"]
 		password = vanity

--
Gitblit v1.9.1