User permissions to add / delete file / folder in svn

I have a requirement that I need to be allowed to add / delete (not read / modify / write) a file in svn. I checked if svn access control has ways to do this. But he has no such restriction.

I checked some preliminary commands that can perform this operation, and around this script svnperms has this function. However, it also has a similar access control implementation, so I'm not sure if I want to use it in conjunction with an access control script.

So, can I offer any suggestion on the best way to exercise add / remove rights for users?

+6
source share
1 answer

I have a Perl pre-commit hook that allows you to set "add" access. This is mainly used for tags (you can create a tag but not modify the tag), but I suppose it could be a check to see if a particular file has been added. I do not have special access only for deletion in my capture, although it should not be too difficult to add.

My preference was to use the server access control list to provide read / write access to the repository, and then remove the write access through my hook for pre-commit. (There is no pre-check hook, so there is no way to prevent read access in the hook itself.)

Remember to look at it and see if you can add the add-remove access that you need. It should not be too complicated. I pretty much take the output of svnserve log and parse it to see if it was added, deleted, changed, etc. File.

+2
source

Source: https://habr.com/ru/post/885969/


All Articles