You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Jo...@shell.com on 2007/07/10 16:52:50 UTC

controlling delete

Is there a command for controlling SVN delete.  We would like to only give specific users delete privileges and not allow others to have it.

Thanks,



John Salinardo
IT Development
Shell Trading Gas & Power
909 Fannin St., Houston, TX  77010, USA

Tel: +1-713-230-3047 000 Other Tel: 832-265-5099
Email: john.salinardo@shell.com
Internet: http://www.shell.com


Re: controlling delete

Posted by Nathan Kidd <na...@spicycrypto.ca>.
John.Salinardo@shell.com wrote:
> Is there a command for controlling SVN delete.  We would like to only
> give specific users delete privileges and not allow others to have it.

Try svnperms.py:
http://subversion.tigris.org/tools_contrib.html#svnperms_py

Note svn has built in authz support, but I don't think it distinguishes
between modification permission and delete permission (since from a
data-integrity standpoint modifying a file to be empty is equivalent to
deleting it).  From a prevent-users-from-doing-stupid-things standpoint
the separate delete permission provided by scripts like svnperms is useful.

-Nathan

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

Re: controlling delete

Posted by Karl Fogel <kf...@red-bean.com>.
Greg Thomas <th...@omc.bt.co.uk> writes:
> On Tue, 10 Jul 2007 11:52:50 -0500, <Jo...@shell.com> wrote:
>
>>Is there a command for controlling SVN delete.  We would like to only
>>give specific users delete privileges and not allow others to have it.
>
> I'm sure you're aware of this, but remember that this is also likely
> to prevent use of "svn move", too.

Note that a pre-commit hook could distinguish between deletes and
moves and prohibit only the former.  Basically, if there's a 'delete'
in the commit, without at least one corresponding 'copy' ('add with
history') of the deleted file happening somewhere else, then prohibit.

-Karl

-- 
Subversion support & consulting  <>  http://producingoss.com/consulting.html

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

Re: controlling delete

Posted by Greg Thomas <th...@omc.bt.co.uk>.
On Tue, 10 Jul 2007 11:52:50 -0500, <Jo...@shell.com> wrote:

>Is there a command for controlling SVN delete.  We would like to only
>give specific users delete privileges and not allow others to have it.

I'm sure you're aware of this, but remember that this is also likely
to prevent use of "svn move", too.

Greg
-- 
This post represents the views of the author and does
not necessarily accurately represent the views of BT.

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

RE: RE: controlling delete

Posted by Jo...@shell.com.
It's even a Shell script - good stuff.
 
Thanks
 
Trevor
 
-----Original Message-----
From: Trevor Spackman [mailto:tspackma@myriad.com]
Sent: Tuesday, July 10, 2007 12:16 PM
To: Salinardo, John J STGP-STT/2; users@subversion.tigris.org
Cc: Trevor Spackman
Subject: RE: RE: controlling delete



This is a snippet from our pre-commit hook that will prevent a user from modifying a tag - they can only be added or deleted:

 

   if [ -n "`$SVNLOOK changed -t "$2" "$1" | grep "^[^AD].*/tags/"`" ] ; then

      echo "Tags may be added/deleted, but not modified"  >&2

      exit 1

   fi

 

Trevor

  _____  

From: John.Salinardo@shell.com [mailto:John.Salinardo@shell.com] 
Sent: Tuesday, July 10, 2007 11:08 AM
To: Trevor Spackman
Subject: RE: RE: controlling delete

 

Trevor,

 

An example would just be terrific.  Thanks.

 

JS

 

-----Original Message-----
From: Trevor Spackman [mailto:tspackma@myriad.com]
Sent: Tuesday, July 10, 2007 12:00 PM
To: Salinardo, John J STGP-STT/2; users@subversion.tigris.org
Cc: Trevor Spackman
Subject: RE: controlling delete

You can achieve this by adding a pre-commit hook, and disallowing deletes there.  It will return an error message to the user that you define.

 

If you'd like an example, I can create one...

 

HTH,

Trevor

 

 

  _____  

From: John.Salinardo@shell.com [mailto:John.Salinardo@shell.com] 
Sent: Tuesday, July 10, 2007 10:53 AM
To: users@subversion.tigris.org
Subject: controlling delete

 

Is there a command for controlling SVN delete.  We would like to only give specific users delete privileges and not allow others to have it.

Thanks, 

 

John Salinardo 
IT Development 
Shell Trading Gas & Power 
909 Fannin St., Houston, TX  77010, USA 

Tel: +1-713-230-3047 000 Other Tel: 832-265-5099 
Email: john.salinardo@shell.com 
Internet: http://www.shell.com 


RE: RE: controlling delete

Posted by Trevor Spackman <ts...@myriad.com>.
This is a snippet from our pre-commit hook that will prevent a user from
modifying a tag - they can only be added or deleted:

 

   if [ -n "`$SVNLOOK changed -t "$2" "$1" | grep "^[^AD].*/tags/"`" ] ;
then

      echo "Tags may be added/deleted, but not modified"  >&2

      exit 1

   fi

 

Trevor

________________________________

From: John.Salinardo@shell.com [mailto:John.Salinardo@shell.com] 
Sent: Tuesday, July 10, 2007 11:08 AM
To: Trevor Spackman
Subject: RE: RE: controlling delete

 

Trevor,

 

An example would just be terrific.  Thanks.

 

JS

 

-----Original Message-----
From: Trevor Spackman [mailto:tspackma@myriad.com]
Sent: Tuesday, July 10, 2007 12:00 PM
To: Salinardo, John J STGP-STT/2; users@subversion.tigris.org
Cc: Trevor Spackman
Subject: RE: controlling delete

You can achieve this by adding a pre-commit hook, and disallowing
deletes there.  It will return an error message to the user that you
define.

 

If you'd like an example, I can create one...

 

HTH,

Trevor

 

 

________________________________

From: John.Salinardo@shell.com [mailto:John.Salinardo@shell.com] 
Sent: Tuesday, July 10, 2007 10:53 AM
To: users@subversion.tigris.org
Subject: controlling delete

 

Is there a command for controlling SVN delete.  We would like to only
give specific users delete privileges and not allow others to have it.

Thanks, 

 

John Salinardo 
IT Development 
Shell Trading Gas & Power 
909 Fannin St., Houston, TX  77010, USA 

Tel: +1-713-230-3047 000 Other Tel: 832-265-5099 
Email: john.salinardo@shell.com 
Internet: http://www.shell.com 


RE: controlling delete

Posted by Trevor Spackman <ts...@myriad.com>.
You can achieve this by adding a pre-commit hook, and disallowing
deletes there.  It will return an error message to the user that you
define.

 

If you'd like an example, I can create one...

 

HTH,

Trevor

 

 

________________________________

From: John.Salinardo@shell.com [mailto:John.Salinardo@shell.com] 
Sent: Tuesday, July 10, 2007 10:53 AM
To: users@subversion.tigris.org
Subject: controlling delete

 

Is there a command for controlling SVN delete.  We would like to only
give specific users delete privileges and not allow others to have it.

Thanks, 

 

John Salinardo 
IT Development 
Shell Trading Gas & Power 
909 Fannin St., Houston, TX  77010, USA 

Tel: +1-713-230-3047 000 Other Tel: 832-265-5099 
Email: john.salinardo@shell.com 
Internet: http://www.shell.com