You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Matthias Fechner <id...@fechner.net> on 2009/04/23 07:04:53 UTC

Prevent users from commiting in tags/

Hi,

I have here a repository running where the users commit there canges 
over ssh with scponly as shell.
I want now to deny commits into the tags directory.
(only copy to tags should be allowed)

I think it should be possible with a hook.
Has here anyone a solution?

Best regards
Matthias

-- 
"Programming today is a race between software engineers striving to 
build bigger and better idiot-proof programs, and the universe trying to 
produce bigger and better idiots. So far, the universe is winning." -- 
Rich Cook

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1874436

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Prevent users from commiting in tags/

Posted by David Weintraub <qa...@gmail.com>.
On Thu, Apr 23, 2009 at 8:24 AM, Andrey Repin <an...@freemail.ru> wrote:
> Greetings, Subversion Users!
>
>> I have here a repository running where the users commit there canges
>> over ssh with scponly as shell.
>> I want now to deny commits into the tags directory.
>> (only copy to tags should be allowed)
>
>> I think it should be possible with a hook.
>> Has here anyone a solution?
>
> Why you need hooks?
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1584335

As some people have pointed out, you can lock down the tags directory
via the configuration except for a few users who are allowed to create
tags. There are a few problems with this:

* Users have to go to the tag-creating user to get their tags made.
* If the tag creating user is also a developer, there is still a good
possibility that user would accidentally update the tag.

The Python pre-commit hook allows you to specify that a directory is
"add-only" for a particular set of people. See
http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and take a
look at svnperms.py and svnperms.conf.example.

-- 
David Weintraub
qazwart@gmail.com

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1879979

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Prevent users from commiting in tags/

Posted by Matthias Fechner <id...@fechner.net>.
Hi,

Andrey Repin schrieb:
> Why you need hooks?
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1584335
> Isn't it what you need?

thanks for all your suggestions.
I use now a combination of both.
Only some users are allowed to copy to tags/ and updates to the
directory are denied by the following code in my pre-commit hook:
# Do not allow updates in tags
UPDATES_IN_TAGS=`$SVNLOOK changed -t "$TXN" "$REPOS" | $GREP '^U' | grep
-i 'tags/'`
if [ "$UPDATES_IN_TAGS" != "" ]; then
        echo 1>&2
        echo "Updates in tags/ are not allowed." 1>&2
        echo "Create a new tag for it." 1>&2
        exit 1
fi

Best regards
Matthias

-- 

"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the universe trying to
produce bigger and better idiots. So far, the universe is winning." --
Rich Cook

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2361538

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Prevent users from commiting in tags/

Posted by Andrey Repin <an...@freemail.ru>.
Greetings, Subversion Users!

> I have here a repository running where the users commit there canges
> over ssh with scponly as shell.
> I want now to deny commits into the tags directory.
> (only copy to tags should be allowed)

> I think it should be possible with a hook.
> Has here anyone a solution?

Why you need hooks?
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1584335
Isn't it what you need?


--
WBR,
 Andrey Repin (anrdaemon@freemail.ru) 23.04.2009, <16:22>

Sorry for my terrible english...

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1877806

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

RE: Prevent users from commiting in tags/

Posted by David Aldrich <da...@eu.nec.com>.
Perhaps these links will help:

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

http://svn.haxx.se/users/archive-2008-09/0070.shtml

David 

> -----Original Message-----
> From: Matthias Fechner [mailto:idefix@fechner.net] 
> Sent: 23 April 2009 08:05
> To: users@subversion.tigris.org
> Subject: Prevent users from commiting in tags/
> 
> Hi,
> 
> I have here a repository running where the users commit there 
> canges over ssh with scponly as shell.
> I want now to deny commits into the tags directory.
> (only copy to tags should be allowed)
> 
> I think it should be possible with a hook.
> Has here anyone a solution?
> 
> Best regards
> Matthias
> 
> --
> "Programming today is a race between software engineers 
> striving to build bigger and better idiot-proof programs, and 
> the universe trying to produce bigger and better idiots. So 
> far, the universe is winning." -- Rich Cook
> 
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&
> dsMessageId=1874436
> 
> To unsubscribe from this discussion, e-mail: 
> [users-unsubscribe@subversion.tigris.org].
> 
> 
>  Click 
> https://www.mailcontrol.com/sr/LjXjN6qOl3bTndxI!oX7UlEvFrFJ1Ek
C1VljUshOnVY8EzeyFVHDL0fXpq3n+pS2klBQiPoXvLhd8GUOJKJHvw==  to report this email > as spam.
>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1875051

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].