noshutdown-ru / vault

Is a plugin for project management system Redmine. Allows you to store various passwords/keys in one place for the project.
https://noshutdown.ru/en/redmine-plugins-vault
46 stars 29 forks source link

Search not working #24

Closed camlafit closed 6 years ago

camlafit commented 6 years ago

Hello

I've just installed plugin on my instance :

Environment:
  Redmine version                3.3.1.stable
  Ruby version                   2.3.3-p222 (2016-11-21) [i386-linux-gnu]
  Rails version                  4.2.10
  Environment                    production
  Database adapter               SQLite
SCM:
  Subversion                     1.9.5
  Git                            2.11.0
  Filesystem                     
  GitRemote                      2.11.0
Redmine plugins:
  redmine_default_custom_query   1.1.2
  redmine_git_remote             0.0.1
  redmine_spent_time             3.1.2
  redmine_tweaks                 1.0.0
  redmine_wktime                 2.7
  vault                          0.3.6

In role management I've enabled all options related to this plugin. I can add without problem a key, from vault admin page I can export data and see all key added.

But from vault project tab, I get a 500 error ( projects/projects1/keys?utf8=✓&query=mat&commit=Mettre+à+jour )

Started GET "/projects/projects1/keys?utf8=%E2%9C%93&query=mat&commit=Mettre+%C3%A0+jour" for 88.190.92.83 at 2018-02-19 17:14:56 +0100
Processing by KeysController#index as HTML
  Parameters: {"utf8"=>"�", "query"=>"mat", "commit"=>"Mettre à jour", "project_id"=>"projects1"}
  Current user: admin (id=3)
Completed 500 Internal Server Error in 143ms (ActiveRecord: 97.9ms)

NoMethodError (private method `select' called for nil:NilClass):
  plugins/vault/app/controllers/keys_controller.rb:51:in `index'
  lib/redmine/sudo_mode.rb:63:in `sudo_mode'
noshutdown-ru-user commented 6 years ago

Search is broken, /projects/projects1/keys without should work, we will fix it

camlafit commented 6 years ago

Hello

No more error with a search :) But key listing stay empty with(out) search.

noshutdown-ru-user commented 6 years ago

disable in role configuration Whitelisted keys if you use whitelisted keys for this role you need add this user in whitelist for each key in project

camlafit commented 6 years ago

Hello

Ok was Whitelisted keys option , I've misunderstood this feature. Thank a lot :)

noshutdown-ru-user commented 6 years ago

You welcome, we working around of new ,more clear for understanding, logic