oivoodoo / devise_masquerade

Extension for devise, enable login as functionality. Add link to the masquerade_path(resource) and use it.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

#{name}_masquerade_owner is broken

ilya-konanykhin opened this issue · comments

Looks like #{name}_masquerade_owner is broken. It always tries to find a resource by GlobalID: https://github.com/oivoodoo/devise_masquerade/blob/master/lib/devise_masquerade/controllers/helpers.rb#L53-L63

However, when the owner resource ID is being written, it is GlobalID only when using cache, when using session it is plain to_param: https://github.com/oivoodoo/devise_masquerade/blob/master/app/controllers/devise/masquerades_controller.rb#L168-L175

Or maybe I'm missing something?

commented

Hi @ilya-konanykhin . everything is reasonable, going to apply the patch during the day. session/cache changes were applied fast enough by me and I missed it. thank you for the report!

commented

Hi @ilya-konanykhin please give a try 2.0.2 if it works for you. thank you!

Thanks a lot @oivoodoo that fixed it! However I think there's another bug, let me investigate and create another issue ticket.

However I think there's another bug, let me investigate and create another issue ticket.

Nevermind, it's just us using your code the way it wasn't intended to be used. Thanks again for fixing the bug!

commented

@ilya-konanykhin thank you!