You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by David Aldrich <Da...@EU.NEC.COM> on 2008/09/03 08:51:03 UTC

Making tags read-only - use commit-access-control.pl ?

Hi

We want to make the tags folders of our repos read-only to prevent users turning tags into branches.

I have seen mention of using commit-access-control.pl to achieve this. Is this the recommended solution or is there a better solution?

Can anyone point me to appropriate instructions please?

BR

David

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


RE: Making tags read-only - use commit-access-control.pl ?

Posted by Engebakken Geir <ge...@edb.com>.
I tried this script, but it failed for us. I found the problem, and it was that it greps for ^tags in the TXN, but as I found out our TXN line looked like this :

Projecta/tags/pathtofile

When removing the ^ in front of the grep pattern it worked, of course this means that any TXN with the letters tags in them will fail, so it should be at least improved to grep for /tags/, but I havent had much time to really dig deep into this script yet.




Geir

-----Original Message-----
From: Ryan Schmidt [mailto:subversion-2008c@ryandesign.com]
Sent: 3. september 2008 18:27
To: David Aldrich
Cc: users@subversion.tigris.org; 'david.x.grierson@jpmorgan.com'; Rock Sun
Subject: Re: Making tags read-only - use commit-access-control.pl ?


On Sep 3, 2008, at 4:54 AM, David Aldrich wrote:

>> http://svn.haxx.se/users/archive-2005-11/0056.shtml
>
> Thanks for directing me to the above thread.
>
> The condition in the example given in the thread is:
>
> # Deny transaction if any line writes to tags directory that exists.
>
> I have an unusual requirement from a user who wants to prevent
> modification of any files in a tag, but to allow addition of files to
> a tag. (I know this doesn't sound like the usual use of tag).
> Any idea how I could implement that?

Sure. The hook script given above runs "$SVNLOOK" changed -t "$TXN"
"$REPOS" and looks at the second word (presumably intended to be the path to the file, though this will fail if the path to the file ever contains spaces). You would need to add code to look at the first character of the response from svnlook changed rather than throwing it away like the script does. The first character will be "A" if a file is added (which you want to allow) and "M" if a file is modified (which you want to deny). You can also handle "D" (deleted) in any way you choose.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: Making tags read-only - use commit-access-control.pl ?

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Sep 3, 2008, at 4:54 AM, David Aldrich wrote:

>> http://svn.haxx.se/users/archive-2005-11/0056.shtml
>
> Thanks for directing me to the above thread.
>
> The condition in the example given in the thread is:
>
> # Deny transaction if any line writes to tags directory that exists.
>
> I have an unusual requirement from a user who wants to prevent  
> modification of any files in a tag, but to allow addition of files  
> to a tag. (I know this doesn't sound like the usual use of tag).  
> Any idea how I could implement that?

Sure. The hook script given above runs "$SVNLOOK" changed -t "$TXN"  
"$REPOS" and looks at the second word (presumably intended to be the  
path to the file, though this will fail if the path to the file ever  
contains spaces). You would need to add code to look at the first  
character of the response from svnlook changed rather than throwing  
it away like the script does. The first character will be "A" if a  
file is added (which you want to allow) and "M" if a file is modified  
(which you want to deny). You can also handle "D" (deleted) in any  
way you choose.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

RE: Making tags read-only - use commit-access-control.pl ?

Posted by David Aldrich <Da...@EU.NEC.COM>.
Hi

> http://svn.haxx.se/users/archive-2005-11/0056.shtml

Thanks for directing me to the above thread.

The condition in the example given in the thread is:

# Deny transaction if any line writes to tags directory that exists.

I have an unusual requirement from a user who wants to prevent modification of any files in a tag, but to allow addition of files to a tag. (I know this doesn't sound like the usual use of tag). Any idea how I could implement that?

BR

David

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: Making tags read-only - use commit-access-control.pl ?

Posted by da...@jpmorgan.com.
Take a look at this thread:

http://svn.haxx.se/users/archive-2005-11/0056.shtml

Dg.
--
David Grierson
JPMorgan - IB Architecture - Source Code Management Consultant
GDP 228-5574 / DDI +44 141 228 5574 / Email david.x.grierson@jpmorgan.com
Alhambra House 6th floor, 45 Waterloo Street, Glasgow G2 6HS
 



"Rock Sun" <da...@gmail.com> 
03/09/2008 10:37

To
"David Aldrich" <Da...@eu.nec.com>
cc
"users@subversion.tigris.org" <us...@subversion.tigris.org>
Subject
Re: Making tags read-only - use commit-access-control.pl ?






I think commit-access-control.pl could not satified you.
This thread is easy solution:

http://svn.haxx.se/users/archive-2005-11/0056.shtml

2008/9/3 David Aldrich <Da...@eu.nec.com>
Hi

We want to make the tags folders of our repos read-only to prevent users 
turning tags into branches.

I have seen mention of using commit-access-control.pl to achieve this. Is 
this the recommended solution or is there a better solution?

Can anyone point me to appropriate instructions please?

BR

David

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org




-- 
My Blog: http://rocksun.cn/
My Site: http://www.subversion.org.cn

Generally, this communication is for informational purposes only
and it is not intended as an offer or solicitation for the purchase
or sale of any financial instrument or as an official confirmation
of any transaction. In the event you are receiving the offering
materials attached below related to your interest in hedge funds or
private equity, this communication may be intended as an offer or
solicitation for the purchase or sale of such fund(s).  All market
prices, data and other information are not warranted as to
completeness or accuracy and are subject to change without notice.
Any comments or statements made herein do not necessarily reflect
those of JPMorgan Chase & Co., its subsidiaries and affiliates.

This transmission may contain information that is privileged,
confidential, legally privileged, and/or exempt from disclosure
under applicable law. If you are not the intended recipient, you
are hereby notified that any disclosure, copying, distribution, or
use of the information contained herein (including any reliance
thereon) is STRICTLY PROHIBITED. Although this transmission and any
attachments are believed to be free of any virus or other defect
that might affect any computer system into which it is received and
opened, it is the responsibility of the recipient to ensure that it
is virus free and no responsibility is accepted by JPMorgan Chase &
Co., its subsidiaries and affiliates, as applicable, for any loss
or damage arising in any way from its use. If you received this
transmission in error, please immediately contact the sender and
destroy the material in its entirety, whether in electronic or hard
copy format. Thank you.
Please refer to http://www.jpmorgan.com/pages/disclosures for
disclosures relating to UK legal entities.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Making tags read-only - use commit-access-control.pl ?

Posted by Rock Sun <da...@gmail.com>.
I think commit-access-control.pl could not satified you.
This thread is easy solution:

http://svn.haxx.se/users/archive-2005-11/0056.shtml

2008/9/3 David Aldrich <Da...@eu.nec.com>

> Hi
>
> We want to make the tags folders of our repos read-only to prevent users
> turning tags into branches.
>
> I have seen mention of using commit-access-control.pl to achieve this. Is
> this the recommended solution or is there a better solution?
>
> Can anyone point me to appropriate instructions please?
>
> BR
>
> David
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>


-- 
My Blog: http://rocksun.cn/
My Site: http://www.subversion.org.cn