Add write control on repository from Redmine interface

* new methods to add/remove rights in app/models/role.rb
  * some unit tests
  * add write check in Redmine.pm

To keep compatibility migration add write rights to non builtin roles
but default clean install give write access only to manager and
developer, not to reporter.


git-svn-id: http://redmine.rubyforge.org/svn/branches/nbc@1791 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Nicolas Chuche
2008-09-08 13:01:40 +00:00
parent 473869db6b
commit f5f51f4f83
6 changed files with 66 additions and 9 deletions
+1
View File
@@ -88,6 +88,7 @@ Redmine::AccessControl.map do |map|
map.permission :manage_repository, {:repositories => [:edit, :destroy]}, :require => :member
map.permission :browse_repository, :repositories => [:show, :browse, :entry, :annotate, :changes, :diff, :stats, :graph]
map.permission :view_changesets, :repositories => [:show, :revisions, :revision]
map.permission :commit_access, {}
end
map.project_module :boards do |map|
+2 -1
View File
@@ -67,7 +67,8 @@ module Redmine
:view_files,
:manage_files,
:browse_repository,
:view_changesets]
:view_changesets,
:commit_access]
reporter = Role.create! :name => l(:default_role_reporter),
:position => 3,