You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Rob Wilkerson <r....@gmail.com> on 2006/09/21 16:26:00 UTC

Help Implementing svnperms.py

I'm trying to get svnperms configured and working properly, but I
don't seem to be having much luck.  I feel like it's a problem of me
just not knowing what I'm doing, but I've had a hard time finding a
good end-to-end explanation of every component.  I'm hoping someone
here can help me identify and correct the error of my ways.

repos/conf/svnperms.conf:
[groups]
admin = user1
sedev = user1 user2 user3 user4
psdev = user5 user6 user7 user8

#
# the name of the repository is "siteexecutive"
#
[siteexecutive]
# Severely restrict access to certain locations
.* = @admin(add,remove,update)

trunk/.* = @admin(add,remove,update)
trunk/\.admin/assigned_class_ids.txt = *(update)

branches/.* = @admin(add,remove,update)

pre-commit:
REPOS="$1"
TXN="$2"

# Make sure that the log message contains some text.
SVNLOOK=/usr/bin/svnlook
$SVNLOOK log -t "$TXN" "$REPOS" | \
   grep "[a-zA-Z0-9]" > /dev/null || SVNLOOKOK=0

if [ $SVNLOOKOK = 0 ]; then
   echo "No commit message was supplied." >&2
   exit 1
fi

/usr/bin/python /opt/projects/bin/svn/svnperms.py \
 -r $REPOS \
 -t $TXN

exit 0

For some reason, user3 is able to commit changes to a branches
subdirectory.  What am I  missing in my call or my config?

TIA.

-- 

Rob Wilkerson

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

Re: Help Implementing svnperms.py

Posted by Mark <ma...@mitsein.net>.
$? is the return value of the last thing run in the shell.  Nothing to
do with python, really :)

On 9/21/06, Rob Wilkerson <r....@gmail.com> wrote:
> Aha.  I had no idea how svnperms was returning information (my python
> is, ahem, limited).  What is the "$?" notation?  Is that the actual
> value I should use or is that an indication that I should include
> actual data?
>
> Thanks for setting me straight.
>
> On 9/21/06, Reedick, Andrew <An...@bellsouth.com> wrote:
> > > -----Original Message-----
> > > From: Rob Wilkerson [mailto:r.d.wilkerson@gmail.com]
> > > Sent: Thursday, September 21, 2006 12:26 PM
> > > To: Subversion Mailing List
> > > Subject: Help Implementing svnperms.py
> > >
> > > I'm trying to get svnperms configured and working properly, but I
> > > don't seem to be having much luck.  I feel like it's a problem of me
> > > just not knowing what I'm doing, but I've had a hard time finding a
> > > good end-to-end explanation of every component.  I'm hoping someone
> > > here can help me identify and correct the error of my ways.
> > >
> > >
> > > /usr/bin/python /opt/projects/bin/svn/svnperms.py \
> > >  -r $REPOS \
> > >  -t $TXN
> > >
> > > exit 0
> > >
> > > For some reason, user3 is able to commit changes to a branches
> > > subdirectory.  What am I  missing in my call or my config?
> > >
> >
> > You're always exiting with 0.
> >
> >
> > /usr/bin/python /opt/projects/bin/svn/svnperms.py \
> >  -r $REPOS \
> >  -t $TXN
> > if [ $? -ne 0 ]
> > then
> >         exit 1
> > fi
> >
> >
> >
> > *****
> >
> > The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. GA621
> >
> >
> >
>
>
> --
>
> Rob Wilkerson
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>


-- 
Mark
"Blessed is he who finds happiness in his own foolishness, for he will
always be happy."

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

Re: Help Implementing svnperms.py

Posted by Rob Wilkerson <r....@gmail.com>.
Aha.  I had no idea how svnperms was returning information (my python
is, ahem, limited).  What is the "$?" notation?  Is that the actual
value I should use or is that an indication that I should include
actual data?

Thanks for setting me straight.

On 9/21/06, Reedick, Andrew <An...@bellsouth.com> wrote:
> > -----Original Message-----
> > From: Rob Wilkerson [mailto:r.d.wilkerson@gmail.com]
> > Sent: Thursday, September 21, 2006 12:26 PM
> > To: Subversion Mailing List
> > Subject: Help Implementing svnperms.py
> >
> > I'm trying to get svnperms configured and working properly, but I
> > don't seem to be having much luck.  I feel like it's a problem of me
> > just not knowing what I'm doing, but I've had a hard time finding a
> > good end-to-end explanation of every component.  I'm hoping someone
> > here can help me identify and correct the error of my ways.
> >
> >
> > /usr/bin/python /opt/projects/bin/svn/svnperms.py \
> >  -r $REPOS \
> >  -t $TXN
> >
> > exit 0
> >
> > For some reason, user3 is able to commit changes to a branches
> > subdirectory.  What am I  missing in my call or my config?
> >
>
> You're always exiting with 0.
>
>
> /usr/bin/python /opt/projects/bin/svn/svnperms.py \
>  -r $REPOS \
>  -t $TXN
> if [ $? -ne 0 ]
> then
>         exit 1
> fi
>
>
>
> *****
>
> The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. GA621
>
>
>


-- 

Rob Wilkerson

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

RE: Help Implementing svnperms.py

Posted by "Reedick, Andrew" <An...@BellSouth.com>.
> -----Original Message-----
> From: Rob Wilkerson [mailto:r.d.wilkerson@gmail.com] 
> Sent: Thursday, September 21, 2006 12:26 PM
> To: Subversion Mailing List
> Subject: Help Implementing svnperms.py
> 
> I'm trying to get svnperms configured and working properly, but I
> don't seem to be having much luck.  I feel like it's a problem of me
> just not knowing what I'm doing, but I've had a hard time finding a
> good end-to-end explanation of every component.  I'm hoping someone
> here can help me identify and correct the error of my ways.
> 
> 
> /usr/bin/python /opt/projects/bin/svn/svnperms.py \
>  -r $REPOS \
>  -t $TXN
> 
> exit 0
> 
> For some reason, user3 is able to commit changes to a branches
> subdirectory.  What am I  missing in my call or my config?
> 

You're always exiting with 0.


/usr/bin/python /opt/projects/bin/svn/svnperms.py \
 -r $REPOS \
 -t $TXN
if [ $? -ne 0 ]
then
	exit 1
fi



*****

The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. GA621


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