mirror of
https://github.com/redmine/redmine.git
synced 2025-11-18 03:00:52 +01:00
Ability to close projects (read-only) (#3640).
A new permission (Close/reopen project) is available to give non-admin users the ability to close their projects. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9883 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -46,4 +46,14 @@ class Redmine::AccessControlTest < ActiveSupport::TestCase
|
||||
assert perm.actions.is_a?(Array)
|
||||
assert perm.actions.include?('projects/settings')
|
||||
end
|
||||
|
||||
def test_read_action_should_return_true_for_read_actions
|
||||
assert_equal true, @access_module.read_action?(:view_project)
|
||||
assert_equal true, @access_module.read_action?(:controller => 'projects', :action => 'show')
|
||||
end
|
||||
|
||||
def test_read_action_should_return_false_for_update_actions
|
||||
assert_equal false, @access_module.read_action?(:edit_project)
|
||||
assert_equal false, @access_module.read_action?(:controller => 'projects', :action => 'edit')
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user