プロジェクト

全般

プロフィール

Vote #70766

完了

Search fails when a role haven't "view wiki" permission

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Closed
優先度:
高め
担当者:
-
カテゴリ:
Search engine_16
対象バージョン:
開始日:
2011/09/22
期日:
進捗率:

0%

予定工数:
category_id:
16
version_id:
38
issue_org_id:
9308
author_id:
10527
assigned_to_id:
0
comments:
4
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
35
ステータス-->[Closed]

説明

I have configured a role that haven't the "view wiki" permission.
When a user that has this role (in all projects) search for some word, redmine fails with this message (attachment:bug-in-action.jpg)
If I grant the permission to the role, all works fine.
This is a major bug because normal user can think that the site don't work.

In the log file, I see that the query fails on where condition because "text" field is unknown.

ps: the behavior of redmine in this case is very strange: for example, if I search for mail I have an error, but if I search for mail. all works fine


journals

pasquale [:dedalus] wrote:
> In the log file, I see that the query fails on where condition because "text" field is unknown.

this is the log message:
<pre>

Processing SearchController#index (for 85.33.108.241 at 2011-09-22 11:57:15) [GET]
Parameters: {"action"=>"index", "q"=>"mail", "controller"=>"search"}

ActiveRecord::StatementInvalid (Mysql::Error: Unknown column 'text' in 'where clause': SELECT * FROM `wiki_pages`
WHERE ((1=0) AND (((LOWER(title) LIKE '%mail%') OR (LOWER(text) LIKE '%mail%')))) ORDER BY wiki_pages.created_on
DESC LIMIT 11):
app/controllers/search_controller.rb:77:in `index'
app/controllers/search_controller.rb:76:in `each'
app/controllers/search_controller.rb:76:in `index'
config/initializers/mongrel_cluster_with_rails_211_fix.rb:62:in `dispatch_cgi'
</pre>

--------------------------------------------------------------------------------
Definitely reproduced, big one, thanks.
--------------------------------------------------------------------------------
Fixed with r7568.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

Admin Redmine さんが3年以上前に更新

  • カテゴリSearch engine_16 にセット
  • 対象バージョン1.2.2_38 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0