diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-11-24 21:21:15 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-11-24 21:21:15 +0000 |
commit | f436918dbee678a66d5228341385ae2c9e462a03 (patch) | |
tree | f56169a6cf89328ebcd693b1c3318a9760e769fc /test | |
parent | 6b43e9462e978addc28bd38b219dbb7fda0535ef (diff) | |
download | redmine-f436918dbee678a66d5228341385ae2c9e462a03.tar.gz redmine-f436918dbee678a66d5228341385ae2c9e462a03.zip |
Fixed that :edit_time_entries permission allows creating time entries (#9405).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7921 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/timelog_controller_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/functional/timelog_controller_test.rb b/test/functional/timelog_controller_test.rb index fb635a72d..ce06852f8 100644 --- a/test/functional/timelog_controller_test.rb +++ b/test/functional/timelog_controller_test.rb @@ -117,6 +117,18 @@ class TimelogControllerTest < ActionController::TestCase assert_equal 3, t.user_id end + def test_create_without_log_time_permission_should_be_denied + @request.session[:user_id] = 2 + Role.find_by_name('Manager').remove_permission! :log_time + post :create, :project_id => 1, + :time_entry => {:activity_id => '11', + :issue_id => '', + :spent_on => '2008-03-14', + :hours => '7.3'} + + assert_response 403 + end + def test_update entry = TimeEntry.find(1) assert_equal 1, entry.issue_id |