clear-code / redmine_full_text_search

Full text search for Redmine
MIT License
61 stars 24 forks source link

Search results for files attached under a project menu (file tab) differ between admin and a user with full permissions #79

Closed sugi-t closed 4 years ago

sugi-t commented 4 years ago

Thank you for your valuable plugin.

Issue description: Files attached to tickets are searched as estimated but files attached under project's file menu are only available to admin. It's difficult to write the issue in detail, please see attached capture below. (Selecting Issues tab with no hits (Issues(0)) for a given search word with the user account, then All(1) and Projects(1) are shown as captured, but selecting the All(1) or Projects(1) tab gives no results (number of hits in () change to zero). On the other hand, with admin account, the results are estimated as shown in the capture.

Could you please confirm the issue?

results

files

Environment: Redmine version 4.0.6.stable Ruby version 2.6.3-p62 (2019-04-16) [x86_64-linux] Rails version 5.2.4.1 Environment production Database adapter PostgreSQL Mailer queue ActiveJob::QueueAdapters::AsyncAdapter Mailer delivery smtp SCM: Subversion 1.9.7 Git 2.17.1 Filesystem
Redmine plugins: full_text_search 1.0.4

Pgroonga is installed with the instructions on https://pgroonga.github.io/install/source.html groonga 9.1.1-1.ubuntu18.04.1 (package) with Mecab, chupa-text-http-server on the same server pgroonga-2.2.2 (from source without no optional configuration for build and install)

(日本語) 有益なプラグインを公開頂きありがとうございます。 adminアカウントと一般アカウント(全権限付与済)の間でサーチ結果の表示に相違が発生している模様のためご確認・ご対応頂けないかと思い登録させて頂きます。

発生事象 ファイルをプロジェクトレベルのFilesタブ配下に登録後、adminユーザで検索した結果表示(期待通り)と一般ユーザ(全権限をテスト用に付与済)で検索した結果表示に相違があります。 具体的には同じサーチワードで同じプロジェクト階層を表示した状態から検索した結果表示で添付キャプチャの様にadminでは結果へのリンクがスニペット付きで表示されますが、一般ユーザの場合はAll(1)またはProjects(1)のタブを選択するとAll(0), Projects(0)と変更されてしまい結果へのリンクが表示されません。英文では記載しませんでしたがインストール直後の管理者権限を付与してプロジェクトへメンバー追加した別ユーザで検索しても同様の結果でした。 チケットに添付したファイルが期待通り検索されることは確認済です。また、一般ユーザの場合だけ表示されなかった添付ファイルをチケットに添付し同じサーチワードで検索した場合には当該部分が減算された結果表示となる様です。(タブを選択すると件数が減となり、選択後の参照リンク表示なし)

後書き 大変有益なプラグインなのですが、添付ファイルの一部(File配下)が一般ユーザから検索できないため導入に躊躇がございます。本事象についてご確認頂けましたら幸いです。

kou commented 4 years ago

Thanks for your report. I've fixed it.

sugi-t commented 4 years ago

Thank you for your kind attention and quick fix. I confirm the issue is fixed.