TechFanDan
TechFanDan

Reputation: 3482

Removing create and delete permissions in Subversion

I'm just wondering if it's possible to disable create and delete permissions for certain users in the SVN repository?

The goal would be to tie everything with our CMS. Non IT-users would go through the CMS to insert, update and delete (create and delete modifies the database). IT personnel could use their IDEs to update the content after they have created it in the CMS.

Upvotes: 0

Views: 2000

Answers (1)

David W.
David W.

Reputation: 107040

Take a look at my pre-commit hook. It allows you to specify four different types of file permission:

  • read-only: Read only. No commit permission
  • read-write: User has permission to read and commit the file(s)
  • add-only: User can add, but not modify. This is used for tags
  • no-delete: User can modify, but not delete the file(s).

I don't have a no-add permission setting, but it shouldn't be too difficult to add. Take a look at the CheckFile method in the ConfigFile class (line 701). It looks like all you need to do is add in two to four lines of code.

You'll also have to modify the VerifySection class in the Section::File class (line 1351). Again, it's adding a few lines of code.

Upvotes: 1

Related Questions