[PATCH 1 of 2] acl: add support for branch-based access control

Elifarley Callado Coelho Cruz elifarley at gmail.com
Tue May 4 12:34:01 CDT 2010


Hi Martin,

I wasn't aware of the reST markup in docstrings, thanks.

I'll remember this in my next commits.

Cheers,
Elifarley

On Tue, May 4, 2010 at 14:02, Martin Geisler <mg at aragost.com> wrote:

> elifarley at gmail.com writes:
>
> > # HG changeset patch
> > # User Elifarley Callado Coelho Cruz <elifarley at gmail.com>
> > # Date 1272973040 10800
> > # Node ID e65678957b997c936d4f964f4d16fa9f3d842693
> > # Parent  c4347e48b0d0b05c3677f3c12ef465467584672c
> > acl: add support for branch-based access control
>
> Hi,
>
> I don't think you are aware that the help strings are parsed for
> reStructuredText markup. Please always double-check how things look in a
> narrow and in a wide terminal when updating the docstrings.
>
> You can find a reST primer here:
>
>  http://docutils.sourceforge.net/docs/user/rst/quickstart.html
>
> For example, you need a blank line before the list:
>
> > +The order in which access checks are performed is:
> > +1) Deny  list for branches (section [acl.deny.branches])
> > +2) Allow list for branches (section [acl.allow.branches])
> > +3) Deny  list for paths    (section [acl.deny])
> > +4) Allow list for paths    (section [acl.allow])
>
> Headings are underlined in reST, not like this:
>
> > +--- Path-based Access Control ---
>
>
> > +--- Groups ---
> > +
> > +Group names must be prefixed with an @ symbol.
> >  Specifying a group name has the same effect as specifying all the users
> in
> >  that group.
> > +The set of users for a group is taken from "grp.getgrnam"
> > +(see http://docs.python.org/library/grp.html#grp.getgrnam).
>
> The above undoes my commit here where I tried to clean things up:
>
>  http://selenic.com/hg/rev/f6dcbeb5babe
>
> I removed the reference to the Python homepage since we don't normally
> have links in our docstrings and because I think it is an implementation
> detail that should not be in user-level documentation.
>
> >    [acl.deny]
> > -  # This list is checked first. If a match is found, 'acl.allow' will
> not be
> > -  # checked. All users are granted access if acl.deny is not present.
> > -  # Format for both lists: glob pattern = user, ..., @group, ...
> > +  # If a match is found, "acl.allow" will not be checked.
> > +  # if acl.deny is not present, no users denied by default
> > +  # empty acl.deny = all users allowed
> > +  # Format for both lists: glob pattern = user4, user5, @group1
>
> I like the wording of my version from f6dcbeb5babe better :-)
>
> >    # To match everyone, use an asterisk for the user:
> >    # my/glob/pattern = *
> > @@ -84,7 +126,7 @@
> >    images/** = jack, @designers
> >
> >    # Everyone (except for "user6" - see "acl.deny" above) will have write
> access
> > -  # to any file under the "resources" folder (except for 1 file. See
> "acl.deny"):
> > +  to any file under the "resources" folder (except for 1 file. See
> "acl.deny"):
> >    src/main/resources/** = *
>
> I'll fix the above again if/when Matt pushes the patch.
>
> --
> Martin Geisler
>
> aragost Trifork
> Professional Mercurial support
> http://aragost.com/mercurial/
>



-- 
Elifarley Cruz

Profile: http://bit.ly/9hrz0P
Professional info: http://br.linkedin.com/in/elifarley
Google Reader: http://bit.ly/2W7JK2
Bookmarks: http://delicious.com/elifarley
http://twitter.com/elifarley
http://elifarley.amplify.com/
-

" Do not believe anything because it is said by an authority, or if it  is
said to come from angels, or from Gods, or from an inspired source.
Believe it only if you have explored it in your own heart and mind and body
and found it to be true.  Work out your own path, through diligence."
- Gautama Buddha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20100504/9e09107a/attachment.htm>


More information about the Mercurial-devel mailing list