Commit 7fceaaf4 authored by jplang's avatar jplang

Fixed that time entry queries cannot be saved when issue tracking is disabled (#14790).

git-svn-id: https://svn.redmine.org/redmine/trunk@16718 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 117681d5
......@@ -86,6 +86,9 @@ Redmine::AccessControl.map do |map|
map.permission :manage_members, {:projects => :settings, :members => [:index, :show, :new, :create, :edit, :update, :destroy, :autocomplete]}, :require => :member
map.permission :manage_versions, {:projects => :settings, :versions => [:new, :create, :edit, :update, :close_completed, :destroy]}, :require => :member
map.permission :add_subprojects, {:projects => [:new, :create]}, :require => :member
# Queries
map.permission :manage_public_queries, {:queries => [:new, :create, :edit, :update, :destroy]}, :require => :member
map.permission :save_queries, {:queries => [:new, :create, :edit, :update, :destroy]}, :require => :loggedin
map.project_module :issue_tracking do |map|
# Issues
......@@ -110,9 +113,6 @@ Redmine::AccessControl.map do |map|
map.permission :view_private_notes, {}, :read => true, :require => :member
map.permission :set_notes_private, {}, :require => :member
map.permission :delete_issues, {:issues => :destroy}, :require => :member
# Queries
map.permission :manage_public_queries, {:queries => [:new, :create, :edit, :update, :destroy]}, :require => :member
map.permission :save_queries, {:queries => [:new, :create, :edit, :update, :destroy]}, :require => :loggedin
# Watchers
map.permission :view_issue_watchers, {}, :read => true
map.permission :add_issue_watchers, {:watchers => [:new, :create, :append, :autocomplete_for_user]}
......
......@@ -77,6 +77,17 @@ class QueriesControllerTest < Redmine::ControllerTest
assert_select 'input[name=type][value=?]', 'TimeEntryQuery'
end
def test_new_time_entry_query_with_issue_tracking_module_disabled_should_be_allowed
Project.find(1).disable_module! :issue_tracking
@request.session[:user_id] = 2
get :new, :params => {
:project_id => 1,
:type => 'TimeEntryQuery'
}
assert_response :success
end
def test_create_project_public_query
@request.session[:user_id] = 2
post :create, :params => {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment