How to restrict some users to commit in Tortoise SVN

482 Views Asked by At

I want to restrict certain users to commit a particular dirrectory, so that they just have Read only access. How can we do that. I have a pre commit hook which is defined as below :

   REPOS="$1"
   TXN="$2"

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

   commit-access-control.pl "$REPOS" "$TXN" commit-access-control.cfg || exit 1

   # All checks passed, so allow the commit.
   exit 0

Can we include the check to restrict the users in this hookup file if so how can we do that precisely. Or there are 'commit-access-control.pl' and 'commit-access-control.cfg' mentioned in this hookuup. Do we need to change this file to include the user which needs to be restricted ? I was trying to find the files but not able to find them. can somebody let me know the exact location where I can find these files ?

Sorry for all the naive questions but I am new to SVN.

Thanks in advance for your help.

1

There are 1 best solutions below

2
bahrep On

Use path-based authorization to implement user restrictions (permissions) in your Subversion repositories.