-
-
Notifications
You must be signed in to change notification settings - Fork 447
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
Update admin paths and change organization_id to organization_name #4010
Conversation
Agreed. If I read this correctly, pretty much every thing you can do as an admin is affected. |
9d42bd4
to
cd1af9d
Compare
@dorner. If I read the tests right, there are failures that are related to this change. |
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. |
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. |
This should only affect admin things, though, right? |
I use the magical software engineering word should, as in it "should" only affect admin things... 😁 |
(nods) That makes me more at ease about it going in with a bunch of other stuff. |
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. |
# Conflicts: # spec/requests/items_requests_spec.rb
@cielf I can't reproduce that. This is what I get Do you have reproduction instructions? |
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. |
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) 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. |
# Conflicts: # spec/requests/admin_requests_spec.rb
@cielf that was pretty much just there. 😄 I've pushed a fix for it. |
...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. |
I'm happy with it from a functional pov now. Would like @awwaiid to take a look from a technical pov. |
@@ -27,7 +27,7 @@ | |||
get admin_dashboard_path | |||
expect(response).to be_successful | |||
|
|||
edit_user_path_pattern = %r{admin/users/#{user_with_name.id}/edit\?organization_id=\w+} | |||
edit_user_path_pattern = %r{admin/users/#{user_with_name.id}/edit} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great. I made two small non-functional changes -- fixed two comments and removed a few stray organization_id:
path parameters.
Resolved #3991 .
This changes the
organization_id
parameter toorganization_name
, and removes the need fororganization_name
in admin controllers.This is a pretty big change - we probably should do some manual testing on staging.