Hi Philipp,

Not an expert either but from what I know, what you expect seems to be
possible.
I think the best way for you to learn about hooks - apart from the official
doc <https://svnbook.red-bean.com/nightly/en/svn.reposadmin.create.html> -
is to look at the templates created by default when you create a repo
("svnadmin create"). You can also find some examples in the SVN repo:
https://svn.apache.org/viewvc/subversion/trunk/tools/hook-scripts/
https://svn.apache.org/viewvc/subversion/trunk/contrib/hook-scripts/

In your case, the way to go seems to be a *pre-commit* hook.
* For the commit message restriction, look at the examples.
* As for the "can do / can't do", the standard way would be to enforce
"path-based
authorization
<https://svnbook.red-bean.com/en/1.8/svn.serverconfig.pathbasedauthz.html>",
but it isn't flexible at all because it doesn't support wildcards. I would
personally recommend the use of "svnperms
<http://svn.apache.org/repos/asf/subversion/trunk/tools/hook-scripts/>"
which should do what you want: advanced path-based control (with regular
expression support).

I have a kind of "framework for hooks" hosted on GitHub
<https://github.com/justinmassiot/svnhooks>, this may help as an example.

Justin MASSIOT  |  Zentek


On Wed, 25 Aug 2021 at 07:36, Philipp Mueller <philipp.a.muel...@mahle.com>
wrote:

> Hello,
>
> I´m new to this topic and I have quite a hard time getting into
> programming hooks for my problem. I need a hook which can distinguish
> between three different user groups:
>
> Group A: can do anything (delete tags and trunks, commit without comment)
>
> Group B: can commit to tags and delete tags/branches; CANNOT delete trunks
> and CANNOT commit without comment
>
> Group C: can commit to tags; CANNOT change or delete anything
>
> Is there any way to do that?
>
>
> I am very grateful for you help !
>
> Greetings
>
> Philipp from Germany
>
>

Reply via email to