سؤال

I need to maintain a mirrored repository for users(read-only). I need to block all commits except the commit from svnsync. I think I can use a pre-commit hook to block commits other than the svnsync?

How can I do this?

هل كانت مفيدة؟

المحلول

Why use a hook? Can't you just use the authz file to set appropriate permissions?

E.g.

[/]
svnsync = rw
* = r

نصائح أخرى

I would avoid the mirror - and concentrate on getting your access control straight in the master so the users can be constrained to read only access.

You'll set that up in much the same way as the scenario you described. only allowing the service account that does the svnsync to commit. There are lots of options here, depending on your setup. Are you integrating with LDAP? How are you currently doing authentication/authorization?

check out svnperms

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top