human-essentials icon indicating copy to clipboard operation
human-essentials copied to clipboard

Update admin paths and change organization_id to organization_name

Open dorner opened this issue 2 years ago • 1 comments

Resolved #3991 .

This changes the organization_id parameter to organization_name, and removes the need for organization_name in admin controllers.

This is a pretty big change - we probably should do some manual testing on staging.

dorner avatar Jan 05 '24 20:01 dorner

Agreed. If I read this correctly, pretty much every thing you can do as an admin is affected.

cielf avatar Jan 15 '24 18:01 cielf

@dorner. If I read the tests right, there are failures that are related to this change.

cielf avatar Mar 09 '24 01:03 cielf

Should be fixed now! I'd like to try to get this merged sooner rather than later... I don't like having such a big PR getting stale.

dorner avatar Mar 10 '24 19:03 dorner

On the other hand, I'm a little leery about having such a big PR in a release along with a host of other things. g. Let's see if we can get @awwaiid to take a look from a technical pov soonest.

cielf avatar Mar 10 '24 21:03 cielf

This should only affect admin things, though, right?

cielf avatar Mar 10 '24 21:03 cielf

I use the magical software engineering word should, as in it "should" only affect admin things... 😁

dorner avatar Mar 11 '24 13:03 dorner

(nods) That makes me more at ease about it going in with a bunch of other stuff.

cielf avatar Mar 11 '24 16:03 cielf

Hey @dorner,

In the context that this PR 'removes the need for organization name in admin controllers", seeing this path when I logged as the superadmin surprised me. The organization name part is also different than what is on staging, which has the organization_name as admin.

Screenshot 2024-03-12 at 1 09 54 PM

cielf avatar Mar 12 '24 17:03 cielf

@cielf I can't reproduce that. This is what I get image

Do you have reproduction instructions?

dorner avatar Mar 22 '24 20:03 dorner

Of course, it appears to be working now... which puts this back on my list to "kick" -- hopefully I'll find out how I got there.

cielf avatar Mar 23 '24 00:03 cielf

I haven't found it for the dashboard, but this one, which is where you get to after you perform an action on a user in the organization view... seems like it has some redundant info in the path -- yes? (Example with a new test organization, new_org)
http://localhost:3000/admin/organizations/3?organization_name=new_org

Edit: Quickest path to this with a new seed: sign in as superadmin, Organizations | All Organizations View an organization, scroll down to find the user who is not and admin and make them an admin.

cielf avatar Mar 23 '24 00:03 cielf

@cielf that was pretty much just there. :smile: I've pushed a fix for it.

dorner avatar Mar 28 '24 00:03 dorner

...scratch that. The issue is that the controller for that action is not under the admin namespace. Put in a different fix, hoping this works.

dorner avatar Mar 28 '24 00:03 dorner

I'm happy with it from a functional pov now. Would like @awwaiid to take a look from a technical pov.

cielf avatar Mar 28 '24 14:03 cielf