Skip to content

Commit

Permalink
(nomenclature in documentation) changed "category" to "role"
Browse files Browse the repository at this point in the history
I sometimes think my English is not as good as I claim it is.  Or at
least when I'm thinking in perl my English shuts down...
  • Loading branch information
sitaramc committed Oct 29, 2011
1 parent 26155c4 commit 57b3ac3
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 24 deletions.
12 changes: 6 additions & 6 deletions doc/gitolite.rc.mkd
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ on feedback from my users to find or fix issues.
NOTE that due to some quoting and interpolation issues I have not been NOTE that due to some quoting and interpolation issues I have not been
able to look at, a literal "." needs to be specified in this string as able to look at, a literal "." needs to be specified in this string as
`\\.` (two backslashes and a dot). So this is how you'd allow any keys in `\\.` (two backslashes and a dot). So this is how you'd allow any keys in
the "foo" category: `$GL_GITCONFIG_KEYS = "foo\\..*";` the "foo" section: `$GL_GITCONFIG_KEYS = "foo\\..*";`


* `$GL_NO_CREATE_REPOS`, boolean, default 0 * `$GL_NO_CREATE_REPOS`, boolean, default 0


Expand Down Expand Up @@ -309,10 +309,10 @@ on feedback from my users to find or fix issues.
* `$GL_WILDREPOS_PERM_CATS`, string, default "READERS WRITERS" * `$GL_WILDREPOS_PERM_CATS`, string, default "READERS WRITERS"


Originally, we only allowed "R" and "RW" in the setperms command. Now we Originally, we only allowed "R" and "RW" in the setperms command. Now we
allow the admin to define other categories as she wishes (example: allow the admin to define other roles as she wishes (example: MANAGERS,
MANAGERS, TESTERS, etc). TESTERS, etc).


This variable is a space-separated list of the allowed categories. This variable is a space-separated list of the allowed roles.


PLEASE, *PLEASE*, read the section in PLEASE, *PLEASE*, read the section in
[doc/wildcard-repositories.mkd][wild] for caveats and warnings. This is a [doc/wildcard-repositories.mkd][wild] for caveats and warnings. This is a
Expand All @@ -324,8 +324,8 @@ on feedback from my users to find or fix issues.


$GL_WILDREPOS_PERM_CATS = "READERS WRITERS"; $GL_WILDREPOS_PERM_CATS = "READERS WRITERS";


You can use your own categories in addition to the standard ones; I You can use your own roles in addition to the standard ones; I suggest you
suggest you include READERS and WRITERS for backward compatbility though: include READERS and WRITERS for backward compatbility though:


$GL_WILDREPOS_PERM_CATS = "READERS WRITERS MANAGERS TESTERS"; $GL_WILDREPOS_PERM_CATS = "READERS WRITERS MANAGERS TESTERS";


Expand Down
35 changes: 17 additions & 18 deletions doc/wildcard-repositories.mkd
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ In this document:
* <a href="#_side_note_line_anchored_regexes">side-note: line-anchored regexes</a> * <a href="#_side_note_line_anchored_regexes">side-note: line-anchored regexes</a>
* <a href="#_contrast_with_refexes">contrast with refexes</a> * <a href="#_contrast_with_refexes">contrast with refexes</a>
* <a href="#_handing_out_rights_to_wildcard_matched_repos">handing out rights to wildcard-matched repos</a> * <a href="#_handing_out_rights_to_wildcard_matched_repos">handing out rights to wildcard-matched repos</a>
* <a href="#_admin_adding_other_categories_than_READERS_and_WRITERS">(admin) adding other categories than READERS and WRITERS</a> * <a href="#_admin_adding_other_roles_than_READERS_and_WRITERS">(admin) adding other roles than READERS and WRITERS</a>
* <a href="#_IMPORTANT_WARNING_ABOUT_THIS_FEATURE_">**IMPORTANT WARNING ABOUT THIS FEATURE**</a> * <a href="#_IMPORTANT_WARNING_ABOUT_THIS_FEATURE_">**IMPORTANT WARNING ABOUT THIS FEATURE**</a>
* <a href="#_setting_a_gitweb_description_for_a_wildcard_matched_repo">setting a gitweb description for a wildcard-matched repo</a> * <a href="#_setting_a_gitweb_description_for_a_wildcard_matched_repo">setting a gitweb description for a wildcard-matched repo</a>
* <a href="#_reporting">reporting</a> * <a href="#_reporting">reporting</a>
Expand Down Expand Up @@ -175,10 +175,10 @@ part of this list*** is controlled by the person who created the repository.
The use case is that, although our toy example has only 3 students, in reality The use case is that, although our toy example has only 3 students, in reality
there will be a few dozen, but each assignment will be worked on only by a there will be a few dozen, but each assignment will be worked on only by a
handful from among those. This allows the creator to take ad hoc sets of handful from among those. This allows the creator to take ad hoc sets of
users from among the actual users in the system, and place them into one of users from among the actual users in the system, and give them one of two
two categories (in this example, READERS and WRITERS respectively). In theory roles (in this example, READERS and WRITERS respectively). In theory you
you could do the same thing by creating lots of little "assignment-NN" groups could do the same thing by creating lots of little "assignment-NN" groups in
in the config file but that may be a little too cumbersome for non-secret the config file but that may be a little too cumbersome for non-secret
environments. environments.


Create a small text file that contains the permissions you desire: Create a small text file that contains the permissions you desire:
Expand Down Expand Up @@ -208,13 +208,13 @@ The following points are important:
`:` like in a repo URL. The first space-separated word is READERS or `:` like in a repo URL. The first space-separated word is READERS or
WRITERS, and the rest are simple usernames. WRITERS, and the rest are simple usernames.


<a name="_admin_adding_other_categories_than_READERS_and_WRITERS"></a> <a name="_admin_adding_other_roles_than_READERS_and_WRITERS"></a>


### (admin) adding other categories than READERS and WRITERS ### (admin) adding other roles than READERS and WRITERS


Let's say your needs are more complex and you need more categories of users. Let's say your needs are more complex and you need more roles. For example,
For example, you might like to have a setup where only a tester can update you might like to have a setup where only a tester can update tags, and only a
tags, and only a manager can delete branches: manager can delete branches:


repo foo/..* repo foo/..*
C = u1 C = u1
Expand All @@ -241,14 +241,13 @@ file. The rc file documentation (`doc/gitolite.rc.mkd`) explains how.


#### **IMPORTANT WARNING ABOUT THIS FEATURE** #### **IMPORTANT WARNING ABOUT THIS FEATURE**


Please make sure that none of the category names conflict with any of the Please make sure that none of the role names conflict with any of the
**usernames** in the system. For example, if you have a user called "foo", **usernames** in the system. For example, if you have a user called "foo",
make sure you do not include "foo" as a valid category in make sure you do not include "foo" as a valid role in
`$GL_WILDREPOS_PERM_CATS`. `$GL_WILDREPOS_PERM_CATS`.


You can keep things sane by using UPPERCASE names for categories, while You can keep things sane by using UPPERCASE names for roles, while keeping all
keeping all your usernames lowercase; then you don't have to worry about this your usernames lowercase; then you don't have to worry about this problem.
problem.


<a name="_setting_a_gitweb_description_for_a_wildcard_matched_repo"></a> <a name="_setting_a_gitweb_description_for_a_wildcard_matched_repo"></a>


Expand Down Expand Up @@ -309,7 +308,7 @@ Now find a repo pattern that matches the actual reponame being pushed -- this
tells you which set of rules to apply. There can be multiple matches; if so, tells you which set of rules to apply. There can be multiple matches; if so,
they will all be applied in the sequence they appear in the config file. they will all be applied in the sequence they appear in the config file.


If the invoking user has been put in the "WRITERS" category using `setperms`, all If the invoking user has been given the "WRITERS" role using `setperms`, all
permissions for the the user WRITERS are given to the invoking username (and permissions for the the user WRITERS are given to the invoking username (and
similarly for READERS). similarly for READERS).


Expand All @@ -330,8 +329,8 @@ Assuming user "u4" trying to push-create a new repo called
RW = @TAs RW = @TAs
R = @prof R = @prof


If u4 puts u5 in the "WRITERS" category using `setperms`, and u5 tries to If u4 gives u5 the "WRITERS" role using `setperms`, and u5 tries to access
access that repo, the ruleset looks like: that repo, the ruleset looks like:


repo assignments/u4/a23 repo assignments/u4/a23
C = @students C = @students
Expand Down

0 comments on commit 57b3ac3

Please sign in to comment.