[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Group permissions to branches

From: Brian Poynor
Subject: Re: Group permissions to branches
Date: Tue, 9 Apr 2002 13:02:40 -0700
User-agent: Mutt/

You can't really do this with the CVSROOT/passwd file. But if you are
primarily concerned about who can commit to Branch A and Branch B (as
opposed to checkout), you can implement that using CVSROOT/commitinfo.

(I answered a similar request earlier, and discounted the option of
using an alternate directory for lock files. This is one of the
primary reasons why. You cannot use unix permissions to govern which
branch a user can work on, which is a fundamental need in my
experience. I believe this is the only mechanism in CVS for this.)

Your commitinfo script can examing the CVS/Tag file. It's the trunk
(mainline) if it doesn't exist, or doesn't have "T" as the first
character in it, otherwise the branch name follows the "T". It is more
work, but also more technically correct to examine the tag value in
the CVS/Entries or CVS/Entries.Log file for each file being committed
instead, since it is possible for a user to update a file from a
different branch into her tree and commit it. The CVS/Tag doesn't
necessarily reflect the branch of every file in the directory.

An additional thing I check that all the files being committed are in
the same branch, since committing to two different branches at once is
almost always a result of user error, and it can be painful to
correct. I figure they can commit twice if that is their intent.

Once you know the branch of the file, you can check that the user is
allowed to commit to that branch using a database of your own design 
(could be as simple as a text file with usernames for each branch).

Just make sure that when your commitinfo scripts disallow a commit,
they print a very clear error message to STDOUT. This will save you
and your cvs users a lot of guesswork later.


On Tue, Apr 09, 2002 at 12:33:07PM -0400, Danial Islam wrote:
> I'm not sure if I posted this already, but here goes again:
> In my repository I have set up a main trunk with two branches coming out
> of it, e.g.  Branch A and
> Branch B.    Is it possible to restrict Branch A to a certain group of
> users, and  Branch B to another group of users?  How would this be done
> in UNIX?
> How would I modify the CVSROOT/passwd file to accomodate this? Right now
> my passwd file currently has [unix ID]:[encoded password] for each user.
> Any help would really, really be appreciated!
> Danial.
> _______________________________________________
> Info-cvs mailing list
> address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]