Fixed: Manage pu(b)lic queries typo (Thomas Lecavelier).
As this fix modifies manage_public_queries permission symbol, this permission has to re-entered. git-svn-id: http://redmine.rubyforge.org/svn/trunk@778 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
dc74a1780f
commit
665497f5fb
|
@ -30,7 +30,7 @@ class QueriesController < ApplicationController
|
|||
@query.project = @project
|
||||
@query.user = logged_in_user
|
||||
@query.executed_by = logged_in_user
|
||||
@query.is_public = false unless current_role.allowed_to?(:manage_pulic_queries)
|
||||
@query.is_public = false unless current_role.allowed_to?(:manage_public_queries)
|
||||
|
||||
params[:fields].each do |field|
|
||||
@query.add_filter(field, params[:operators][field], params[:values][field])
|
||||
|
@ -51,7 +51,7 @@ class QueriesController < ApplicationController
|
|||
@query.add_filter(field, params[:operators][field], params[:values][field])
|
||||
end if params[:fields]
|
||||
@query.attributes = params[:query]
|
||||
@query.is_public = false unless current_role.allowed_to?(:manage_pulic_queries)
|
||||
@query.is_public = false unless current_role.allowed_to?(:manage_public_queries)
|
||||
|
||||
if @query.save
|
||||
flash[:notice] = l(:notice_successful_update)
|
||||
|
|
|
@ -82,7 +82,7 @@ class Query < ActiveRecord::Base
|
|||
def editable_by?(user)
|
||||
return false unless user
|
||||
return true if !is_public && self.user_id == user.id
|
||||
is_public && user.allowed_to?(:manage_pulic_queries, project)
|
||||
is_public && user.allowed_to?(:manage_public_queries, project)
|
||||
end
|
||||
|
||||
def available_filters
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<p><label for="query_name"><%=l(:field_name)%></label>
|
||||
<%= text_field 'query', 'name', :size => 80 %></p>
|
||||
|
||||
<% if current_role.allowed_to?(:manage_pulic_queries) %>
|
||||
<% if current_role.allowed_to?(:manage_public_queries) %>
|
||||
<p><label for="query_is_public"><%=l(:field_is_public)%></label>
|
||||
<%= check_box 'query', 'is_public' %></p>
|
||||
<% end %>
|
||||
|
|
|
@ -36,7 +36,7 @@ Redmine::AccessControl.map do |map|
|
|||
map.permission :move_issues, {:projects => :move_issues}, :require => :loggedin
|
||||
map.permission :delete_issues, {:issues => :destroy}, :require => :member
|
||||
# Queries
|
||||
map.permission :manage_pulic_queries, {:queries => [:new, :edit, :destroy]}, :require => :member
|
||||
map.permission :manage_public_queries, {:queries => [:new, :edit, :destroy]}, :require => :member
|
||||
map.permission :save_queries, {:queries => [:new, :edit, :destroy]}, :require => :loggedin
|
||||
# Gantt & calendar
|
||||
map.permission :view_gantt, :projects => :gantt
|
||||
|
|
|
@ -62,7 +62,7 @@ roles_001:
|
|||
- :change_issue_status
|
||||
- :move_issues
|
||||
- :delete_issues
|
||||
- :manage_pulic_queries
|
||||
- :manage_public_queries
|
||||
- :save_queries
|
||||
- :view_gantt
|
||||
- :view_calendar
|
||||
|
@ -100,7 +100,7 @@ roles_002:
|
|||
- :change_issue_status
|
||||
- :move_issues
|
||||
- :delete_issues
|
||||
- :manage_pulic_queries
|
||||
- :manage_public_queries
|
||||
- :save_queries
|
||||
- :view_gantt
|
||||
- :view_calendar
|
||||
|
@ -138,7 +138,7 @@ roles_003:
|
|||
- :change_issue_status
|
||||
- :move_issues
|
||||
- :delete_issues
|
||||
- :manage_pulic_queries
|
||||
- :manage_public_queries
|
||||
- :save_queries
|
||||
- :view_gantt
|
||||
- :view_calendar
|
||||
|
|
Loading…
Reference in New Issue