You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Ramachandran, Vishwanath(IE10)" <Vi...@Honeywell.com> on 2009/05/21 07:22:21 UTC

Folder rights for subversion

Hi, 

Is it possible to assign user read/write rights on folder basis in
subversion repository? 

If yes, could you please share me the steps 
I believe in SVNSERVE.conf, through passwd and authz it can be set

Correct me, if I am wrong
Thanks,
R.R.Vishwanath
Desk: +91 80 26588360 Extn: 44211
Cell: +91 9632243577

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

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


Is it possible to have a trigger script replace user ID (eid) with name in error messages?

Posted by "Ramachandran, Vishwanath(IE10)" <Vi...@Honeywell.com>.
Hi There

When I look at a log (show log) I can see names in "Authors" column.

But when I want to lock an already locked file it shows me EID of person
who owns the lock: can there be name who locked the file

Is it possible to have a trigger script replace user ID (eid) with name
in error messages?

Regards
R.R.Vishwanath
Desk: +91 80 26588360 Extn: 44211
Cell: +91 9632243577

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

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


RE: Is it possible to have a trigger script replace user ID (eid) with name in error messages?

Posted by "Ramachandran, Vishwanath(IE10)" <Vi...@Honeywell.com>.
Hi There

When I look at a log (show log) I can see names in "Authors" column.

But when I want to lock an already locked file it shows me EID of person
who owns the lock: can there be name who locked the file

Is it possible to have a trigger script replace user ID (eid) with name
in error messages?

Regards
R.R.Vishwanath
Desk: +91 80 26588360 Extn: 44211
Cell: +91 9632243577

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

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


RE: Enable administrator to modifiy log message of Repository

Posted by "Ramachandran, Vishwanath(IE10)" <Vi...@Honeywell.com>.
Hi Ryan

Thank you for the script. That worked like a wonder :)

Regards
R.R.Vishwanath
Desk: +91 80 26588360 Extn: 44211
Cell: +91 9632243577

-----Original Message-----
From: Ryan Schmidt [mailto:subversion-2009b@ryandesign.com] 
Sent: Wednesday, June 10, 2009 3:14 PM
To: Ramachandran, Vishwanath(IE10)
Cc: Subversion Users; Bob Archer; Tyler Roscoe; Campbell Allan
Subject: Re: Enable administrator to modifiy log message of Repository

On Jun 10, 2009, at 03:55, Ramachandran, Vishwanath(IE10) wrote:


> What I would like is only administrator of the repository should edit
> both the log message and author.
>
> Can you help in modifying the script to perform the above operation?

Ah, ok. Well, if "e383084" and "crowdadmin" are the administrators,  
then I might write that this way:


#!/bin/sh

REPOS="$1"
REV="$2"
USER="$3"
PROPNAME="$4"
ACTION="$5"

if [ "$PROPNAME" = "svn:log" -o "$PROPNAME" = "svn:author" ]; then
	if [ "$USER" = "e383084" -o "$USER" = "crowdadmin" ]; then
		# allow this change
		exit 0
	fi
fi

# deny this change
echo "*************************************************" 1>&2
echo "UNAUTHORIZED ACCESS to change this property......" 1>&2
echo "Please contact Repository administrator(s)......." 1>&2
echo "*************************************************" 1>&2
exit 1

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

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


RE: Enable administrator to modifiy log message of Repository

Posted by "Ramachandran, Vishwanath(IE10)" <Vi...@Honeywell.com>.
Hi Ryan

Though the script worked, but still when I give show log, I still get
EID instead of name

Regards
R.R.Vishwanath
Desk: +91 80 26588360 Extn: 44211
Cell: +91 9632243577

-----Original Message-----
From: Ryan Schmidt [mailto:subversion-2009b@ryandesign.com] 
Sent: Wednesday, June 10, 2009 3:14 PM
To: Ramachandran, Vishwanath(IE10)
Cc: Subversion Users; Bob Archer; Tyler Roscoe; Campbell Allan
Subject: Re: Enable administrator to modifiy log message of Repository

On Jun 10, 2009, at 03:55, Ramachandran, Vishwanath(IE10) wrote:


> What I would like is only administrator of the repository should edit
> both the log message and author.
>
> Can you help in modifying the script to perform the above operation?

Ah, ok. Well, if "e383084" and "crowdadmin" are the administrators,  
then I might write that this way:


#!/bin/sh

REPOS="$1"
REV="$2"
USER="$3"
PROPNAME="$4"
ACTION="$5"

if [ "$PROPNAME" = "svn:log" -o "$PROPNAME" = "svn:author" ]; then
	if [ "$USER" = "e383084" -o "$USER" = "crowdadmin" ]; then
		# allow this change
		exit 0
	fi
fi

# deny this change
echo "*************************************************" 1>&2
echo "UNAUTHORIZED ACCESS to change this property......" 1>&2
echo "Please contact Repository administrator(s)......." 1>&2
echo "*************************************************" 1>&2
exit 1

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

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


Re: Enable administrator to modifiy log message of Repository

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jun 10, 2009, at 03:55, Ramachandran, Vishwanath(IE10) wrote:


> What I would like is only administrator of the repository should edit
> both the log message and author.
>
> Can you help in modifying the script to perform the above operation?

Ah, ok. Well, if "e383084" and "crowdadmin" are the administrators,  
then I might write that this way:


#!/bin/sh

REPOS="$1"
REV="$2"
USER="$3"
PROPNAME="$4"
ACTION="$5"

if [ "$PROPNAME" = "svn:log" -o "$PROPNAME" = "svn:author" ]; then
	if [ "$USER" = "e383084" -o "$USER" = "crowdadmin" ]; then
		# allow this change
		exit 0
	fi
fi

# deny this change
echo "*************************************************" 1>&2
echo "UNAUTHORIZED ACCESS to change this property......" 1>&2
echo "Please contact Repository administrator(s)......." 1>&2
echo "*************************************************" 1>&2
exit 1

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

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

RE: Enable administrator to modifiy log message of Repository

Posted by "Ramachandran, Vishwanath(IE10)" <Vi...@Honeywell.com>.
Hi Ryan

What I would like is only administrator of the repository should edit
both the log message and author.

Can you help in modifying the script to perform the above operation?

Regards
R.R.Vishwanath
Desk: +91 80 26588360 Extn: 44211
Cell: +91 9632243577

-----Original Message-----
From: Ryan Schmidt [mailto:subversion-2009b@ryandesign.com] 
Sent: Wednesday, June 10, 2009 5:40 AM
To: Ramachandran, Vishwanath(IE10)
Cc: users@subversion.tigris.org; Bob Archer; Tyler Roscoe; Campbell
Allan
Subject: Re: Enable administrator to modifiy log message of Repository

On Jun 9, 2009, at 04:59, Ramachandran, Vishwanath(IE10) wrote:

> The following properties has been enabled for the repository
> 1) Svn: log - Allow users to edit log messages
> 2) Svn: author- Allow users to edit author
>
> The above mentioned properties has enabled only for one  
> administrator so
> that he can have the above two values
>
> But later, the admin want to remove the svn: author command to avoid
> changes to the author name and I have removed it. Since the svn:  
> author
> is removed, his EID gets populated on notifications instead of  
> name, and
> the admin wants the name back
>
> Would adding svn: author mean that now the author in the history  
> can be
> modified again?
>
> I believe Author can be modified, but in the script it is written like
> user (i.e., admin) should only able to edit the logs, if that first
> condition exists we will not get author name
>
> While comparing user, even if we specify author it won't work
>
> If username has to be displayed I think we need to remove user  
> condition
> also then this will applicable for all users
>
> What to do say? Can this be done? Please share your thoughts?

It would help if you would show us the code of the relevant hook  
script, and let us know what version of Subversion you are using and  
on what operating system.

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

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


Re: Enable administrator to modifiy log message of Repository

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jun 10, 2009, at 01:24, Ramachandran, Vishwanath(IE10) wrote:

> Ryan Schmidt wrote:
>
>> On Jun 9, 2009, at 04:59, Ramachandran, Vishwanath(IE10) wrote:
>>
>>> The following properties has been enabled for the repository
>>> 1) Svn: log - Allow users to edit log messages
>>> 2) Svn: author- Allow users to edit author
>>>
>>> The above mentioned properties has enabled only for one
>>> administrator so
>>> that he can have the above two values
>>>
>>> But later, the admin want to remove the svn: author command to avoid
>>> changes to the author name and I have removed it. Since the svn:
>>> author
>>> is removed, his EID gets populated on notifications instead of
>>> name, and
>>> the admin wants the name back
>>>
>>> Would adding svn: author mean that now the author in the history
>>> can be
>>> modified again?
>>>
>>> I believe Author can be modified, but in the script it is written  
>>> like
>>> user (i.e., admin) should only able to edit the logs, if that first
>>> condition exists we will not get author name
>>>
>>> While comparing user, even if we specify author it won't work
>>>
>>> If username has to be displayed I think we need to remove user
>>> condition
>>> also then this will applicable for all users
>>>
>>> What to do say? Can this be done? Please share your thoughts?
>>
>> It would help if you would show us the code of the relevant hook
>> script, and let us know what version of Subversion you are using and
>> on what operating system.
>
> Thanks for the response. Please find the attached text of the  
> script. It
> pre-revprop change script

Ok, as I see it, the script does these things:

1. Sets some convenience variables.
2. If the property to be changed is svn:log, then allow the change if  
the user is "e383084" or "crowdadmin", otherwise deny the change and  
print an error message.
3. If the property to be changed is svn:author, allow the change.
4. For any other property, deny the change and print an error message  
(though the error message it prints states that only editing svn:log  
is permitted, which is not accurate).

If this is not what you want, how does it differ from what you want?

If the problem is not the behavior of the hook script, perhaps you  
could rephrase what problem you're experiencing?

It does seem odd to me to allow anyone to change the author of any  
commit. That means for example I could commit a change, then change  
the author property to make it look like you committed it.

There is also a stray ":q" at the end of the file. I presume this has  
to do with someone editing the file in vi.

> Subversion used is 1.4.6
> OS is Redhat Enterprise Linux 3

Although it might not relate specifically to this situation, you may  
want to consider upgrading to a newer version of Subversion. The  
current version is 1.6.2, and 1.4.x and older are no longer supported.

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

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

RE: Enable administrator to modifiy log message of Repository

Posted by "Ramachandran, Vishwanath(IE10)" <Vi...@Honeywell.com>.
Hi Ryan

Thanks for the response. Please find the attached text of the script. It
pre-revprop change script

Subversion used is 1.4.6
OS is Redhat Enterprise Linux 3

Regards
R.R.Vishwanath
Desk: +91 80 26588360 Extn: 44211
Cell: +91 9632243577
************************************************************************
************************************************************************
********
-----Original Message-----
From: Ryan Schmidt [mailto:subversion-2009b@ryandesign.com] 
Sent: Wednesday, June 10, 2009 5:40 AM
To: Ramachandran, Vishwanath(IE10)
Cc: users@subversion.tigris.org; Bob Archer; Tyler Roscoe; Campbell
Allan
Subject: Re: Enable administrator to modifiy log message of Repository

On Jun 9, 2009, at 04:59, Ramachandran, Vishwanath(IE10) wrote:

> The following properties has been enabled for the repository
> 1) Svn: log - Allow users to edit log messages
> 2) Svn: author- Allow users to edit author
>
> The above mentioned properties has enabled only for one  
> administrator so
> that he can have the above two values
>
> But later, the admin want to remove the svn: author command to avoid
> changes to the author name and I have removed it. Since the svn:  
> author
> is removed, his EID gets populated on notifications instead of  
> name, and
> the admin wants the name back
>
> Would adding svn: author mean that now the author in the history  
> can be
> modified again?
>
> I believe Author can be modified, but in the script it is written like
> user (i.e., admin) should only able to edit the logs, if that first
> condition exists we will not get author name
>
> While comparing user, even if we specify author it won't work
>
> If username has to be displayed I think we need to remove user  
> condition
> also then this will applicable for all users
>
> What to do say? Can this be done? Please share your thoughts?

It would help if you would show us the code of the relevant hook  
script, and let us know what version of Subversion you are using and  
on what operating system.

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

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

Re: Enable administrator to modifiy log message of Repository

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jun 9, 2009, at 04:59, Ramachandran, Vishwanath(IE10) wrote:

> The following properties has been enabled for the repository
> 1) Svn: log - Allow users to edit log messages
> 2) Svn: author- Allow users to edit author
>
> The above mentioned properties has enabled only for one  
> administrator so
> that he can have the above two values
>
> But later, the admin want to remove the svn: author command to avoid
> changes to the author name and I have removed it. Since the svn:  
> author
> is removed, his EID gets populated on notifications instead of  
> name, and
> the admin wants the name back
>
> Would adding svn: author mean that now the author in the history  
> can be
> modified again?
>
> I believe Author can be modified, but in the script it is written like
> user (i.e., admin) should only able to edit the logs, if that first
> condition exists we will not get author name
>
> While comparing user, even if we specify author it won't work
>
> If username has to be displayed I think we need to remove user  
> condition
> also then this will applicable for all users
>
> What to do say? Can this be done? Please share your thoughts?

It would help if you would show us the code of the relevant hook  
script, and let us know what version of Subversion you are using and  
on what operating system.

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

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

Enable administrator to modifiy log message of Repository

Posted by "Ramachandran, Vishwanath(IE10)" <Vi...@Honeywell.com>.
Hi There

The following properties has been enabled for the repository
1) Svn: log - Allow users to edit log messages
2) Svn: author- Allow users to edit author

The above mentioned properties has enabled only for one administrator so
that he can have the above two values

But later, the admin want to remove the svn: author command to avoid
changes to the author name and I have removed it. Since the svn: author
is removed, his EID gets populated on notifications instead of name, and
the admin wants the name back

Would adding svn: author mean that now the author in the history can be
modified again? 

I believe Author can be modified, but in the script it is written like
user (i.e., admin) should only able to edit the logs, if that first
condition exists we will not get author name

While comparing user, even if we specify author it won't work

If username has to be displayed I think we need to remove user condition
also then this will applicable for all users

What to do say? Can this be done? Please share your thoughts? 

Regards
R.R.Vishwanath
Desk: +91 80 26588360 Extn: 44211
Cell: +91 9632243577

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

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


Re: Folder rights for subversion

Posted by Tyler Roscoe <ty...@cryptio.net>.
Andrey will yell at you if you don't stop top-posting :).

On Tue, May 26, 2009 at 09:20:44PM +0530, Ramachandran, Vishwanath(IE10) wrote:
> Thanks, pre-commit hook is implemented for tags/branches so that both
> admin and read write users can modify
> 
> Now I just want to make changes as I requested

If the hook scripts are already in place, shouldn't this be trivially
easy? Have you tried searching for a solution to your problem in the
archives or with google?

tyler

RE: Folder rights for subversion

Posted by "Ramachandran, Vishwanath(IE10)" <Vi...@Honeywell.com>.
Hi there

Thanks, pre-commit hook is implemented for tags/branches so that both
admin and read write users can modify

Now I just want to make changes as I requested

Regards
R.R.Vishwanath
Desk: +91 80 26588360 Extn: 44211
Cell: +91 9632243577

-----Original Message-----
From: Tyler Roscoe [mailto:tyler@cryptio.net] 
Sent: Tuesday, May 26, 2009 9:02 PM
To: Ramachandran, Vishwanath(IE10)
Cc: users@subversion.tigris.org; Bob Archer
Subject: Re: Folder rights for subversion

On Tue, May 26, 2009 at 08:41:11PM +0530, Ramachandran, Vishwanath(IE10)
wrote:
> I need to set permission on subversion in such a way 
> 
> Only administrator(s) can change the branches and tags folder. 
> 
>  A non-administrator (user with read/write access) can have read/write
> access to trunk but not branches and tags

This question is asked a lot. Search the archives for the solution. You
will be using pre-commit hooks to do this, and I think there is a sample
pre-commit hook script somewhere in the svn distribution or the
Subversion source repository to help you along.

tyler

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

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


Re: Folder rights for subversion

Posted by Tyler Roscoe <ty...@cryptio.net>.
On Tue, May 26, 2009 at 08:41:11PM +0530, Ramachandran, Vishwanath(IE10) wrote:
> I need to set permission on subversion in such a way 
> 
> Only administrator(s) can change the branches and tags folder. 
> 
>  A non-administrator (user with read/write access) can have read/write
> access to trunk but not branches and tags

This question is asked a lot. Search the archives for the solution. You
will be using pre-commit hooks to do this, and I think there is a sample
pre-commit hook script somewhere in the svn distribution or the
Subversion source repository to help you along.

tyler

Re: Folder rights for subversion

Posted by Andy Levy <an...@gmail.com>.
On Tue, May 26, 2009 at 11:11, Ramachandran, Vishwanath(IE10)
<Vi...@honeywell.com> wrote:
> Hi There
>
>
>
> I need to set permission on subversion in such a way
>
>
>
> Only administrator(s) can change the branches and tags folder.
>
>  A non-administrator (user with read/write access) can have read/write
> access to trunk but not branches and tags
>
>
>
> Can we implement this, if yes, could you share your thoughts

Yes. See the manual's section on per-directory access permissions.

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

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


RE: Folder rights for subversion

Posted by "Ramachandran, Vishwanath(IE10)" <Vi...@Honeywell.com>.
Hi There

 

I need to set permission on subversion in such a way 

 

Only administrator(s) can change the branches and tags folder. 

 A non-administrator (user with read/write access) can have read/write
access to trunk but not branches and tags

 

Can we implement this, if yes, could you share your thoughts

 

Regards

R.R.Vishwanath

Desk: +91 80 26588360 Extn: 44211

Cell: +91 9632243577

________________________________

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

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

Re: Folder rights for subversion

Posted by shantanu vibhore <sh...@gmail.com>.
Yes You can
http://svnbook.red-bean.com/en/1.5/svn-book.html#svn.serverconfig.svnserve.auth

Regards,
Shantanu

On Thu, May 21, 2009 at 12:52 PM, Ramachandran, Vishwanath(IE10) <
Vishwanath.Ramachandran@honeywell.com> wrote:

> Hi,
>
> Is it possible to assign user read/write rights on folder basis in
> subversion repository?
>
> If yes, could you please share me the steps
> I believe in SVNSERVE.conf, through passwd and authz it can be set
>
> Correct me, if I am wrong
> Thanks,
> R.R.Vishwanath
> Desk: +91 80 26588360 Extn: 44211
> Cell: +91 9632243577
>
> ------------------------------------------------------
>
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2342481
>
> To unsubscribe from this discussion, e-mail: [
> users-unsubscribe@subversion.tigris.org].
>

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

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