summaryrefslogtreecommitdiffstats
path: root/app/views/queries
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2019-11-20 15:01:24 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2019-11-20 15:01:24 +0000
commit977bbea725d0d6909d081390b3147e18340b532c (patch)
tree1bdc06a6585c4fb60ea0864d35bb4f310b24ae3f /app/views/queries
parent18e6cc9cb6c655c5ef32b07fa7cf764d7821b94f (diff)
downloadredmine-977bbea725d0d6909d081390b3147e18340b532c.tar.gz
redmine-977bbea725d0d6909d081390b3147e18340b532c.zip
Only admin users should be able to manage public queries on the project list (#29482).
Like for issues, project members with the "Manage public" queries are allowed to manage public queries inside their projects, not public global queries that are proposed on /issues. git-svn-id: http://svn.redmine.org/redmine/trunk@19091 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/queries')
-rw-r--r--app/views/queries/_form.html.erb3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/views/queries/_form.html.erb b/app/views/queries/_form.html.erb
index 071496f52..7227a6c5f 100644
--- a/app/views/queries/_form.html.erb
+++ b/app/views/queries/_form.html.erb
@@ -8,8 +8,7 @@
<%= text_field 'query', 'name', :size => 80 %></p>
<% if User.current.admin? ||
- User.current.allowed_to?(:manage_public_queries, @query.project) ||
- @query.type == 'ProjectQuery' && User.current.allowed_to?(:manage_public_queries, @query.project, :global => true) %>
+ User.current.allowed_to?(:manage_public_queries, @query.project) %>
<p><label><%=l(:field_visible)%></label>
<label class="block"><%= radio_button 'query', 'visibility', Query::VISIBILITY_PRIVATE %> <%= l(:label_visibility_private) %></label>
<label class="block"><%= radio_button 'query', 'visibility', Query::VISIBILITY_PUBLIC %> <%= l(:label_visibility_public) %></label>