Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#{name}_masquerade_owner is broken #116

Closed
ilya-konanykhin opened this issue Oct 24, 2022 · 5 comments
Closed

#{name}_masquerade_owner is broken #116

ilya-konanykhin opened this issue Oct 24, 2022 · 5 comments
Assignees

Comments

@ilya-konanykhin
Copy link

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?

@oivoodoo oivoodoo self-assigned this Oct 25, 2022
@oivoodoo
Copy link
Owner

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!

@oivoodoo
Copy link
Owner

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

@ilya-konanykhin
Copy link
Author

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

@ilya-konanykhin
Copy link
Author

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!

@oivoodoo
Copy link
Owner

@ilya-konanykhin thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants