summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-09-30 15:32:03 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-09-30 15:32:03 +0000
commit665497f5fbdf95a806ca49a2da77aa5c82d5e64a (patch)
tree0263a63749aabe1d839820c9292d3cd2d5da4007 /app
parentdc74a1780fa27a0256afcbdc9f1a4bea5fa84059 (diff)
downloadredmine-665497f5fbdf95a806ca49a2da77aa5c82d5e64a.tar.gz
redmine-665497f5fbdf95a806ca49a2da77aa5c82d5e64a.zip
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
Diffstat (limited to 'app')
-rw-r--r--app/controllers/queries_controller.rb4
-rw-r--r--app/models/query.rb2
-rw-r--r--app/views/queries/_form.rhtml2
3 files changed, 4 insertions, 4 deletions
diff --git a/app/controllers/queries_controller.rb b/app/controllers/queries_controller.rb
index bcc233699..fce001cd8 100644
--- a/app/controllers/queries_controller.rb
+++ b/app/controllers/queries_controller.rb
@@ -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)
diff --git a/app/models/query.rb b/app/models/query.rb
index aaaa1ae73..11460c1cb 100644
--- a/app/models/query.rb
+++ b/app/models/query.rb
@@ -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
diff --git a/app/views/queries/_form.rhtml b/app/views/queries/_form.rhtml
index d641fa0b5..28b6479e5 100644
--- a/app/views/queries/_form.rhtml
+++ b/app/views/queries/_form.rhtml
@@ -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 %>