Daniel Orner

Results 115 comments of Daniel Orner

I’d definitely like to see some replacement as part of this PR, and maybe even some additional issues to replace more JS so we don’t lose track of the goal?

@edwinthinks is it safe to merge to main if there are all the other issues you mention? Should we just have a feature branch that we keep updated that we...

@edwinthinks nice call on the service module - that solved a lot of problems. Pretty sure everything should go through the same flow now, so it should all work! (I'll...

@edwinthinks ideally yes, but my life is kind of crazy right now since we moved into a new house yesterday. I'm not sure I'll be able to dedicate any time...

Interesting... I didn't see that when I tested. This code explicitly deals with that case https://github.com/rubyforgood/human-essentials/pull/3117/files#diff-9802ca3c9c4cf89904fd44bc114e35ebdf2c5dd3d5b645491e2b253e1afef29bR95

Ahhh the code doesn't check the current role when it removes it. I can fix this.

Hmm... actually, this case shouldn't be possible: https://github.com/rubyforgood/human-essentials/blob/3098-roles/app/controllers/users/sessions_controller.rb#L19 If you can be an org user and an org admin, you'll always be an org admin. You should never have the...

Hmm... could be. Do you know what controller that goes through? Might have missed a flow.

@edwinthinks can you share exact reproduction instructions? I can't seem to get to this point.

@edwinthinks found the issue - looks like the invitation flow doesn't go through the `sessions#create` method. I updated `current_role` to always pull the right order of roles. Going to wait...