psp
psp

Reputation: 111

Control SVN access only to add, not modify once added in SVN repo

Is it possible to give add-new as well as and modify access to a user and only add new file access to other user? In short, other user should not be able to modify anything once he commits a file to SVN. Do we have this type of access control in SVN?

As far as I know it can only be read or read\write. Please let me know if it is possible.

Upvotes: 1

Views: 114

Answers (2)

mliebelt
mliebelt

Reputation: 15525

Short answer: no, it is not possible.

Long answer: There are a lot of reasons why this approach will fail at the end, here are some of them:

  • There is no support at all from Subversion for an authorization like you want it to have. So the pre-commit hook (mentioned in the answer of @Cedric_Julien) should contain all logic and configuration.
  • The pre-commit hook is only changeable by a system administrator, so every time you want to configure something different, you have to ask them.
  • Every time the user commits a new file, and he has made some fault, he has to contact a different type of user that has modify rights to correct his fault. And even if that happens only with every 100th file, it is not a reasonable process to do that.
  • I cannot imagine why that policy could be reasonable, and under which circumstances. Normally, adding and changing files is seen the same way. I don't know any configuration management system that has a such fine grained access control to allow such a thing. So I suspect that it is not reasonable to implement something like that.

Sorry, I don't think you should do that. Perhaps you could add some of the application context, so we could understand why it is reasonable in your situation.

Upvotes: 0

Cédric Julien
Cédric Julien

Reputation: 80771

You could do such things with the svn pre-commit hook scripts.

You could find a good example of pre-commit hook here.

Upvotes: 1

Related Questions