-
Notifications
You must be signed in to change notification settings - Fork 3
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
Admin upgrade downgrade users #56 #165
Conversation
…to the correct page
…the merchant page for admin
…ted with that merchant as well as downgrading the merchant
…a user is redirected to the correct uri if their role is a user
@@ -13,4 +16,19 @@ def update | |||
merchant.save | |||
redirect_to admin_merchants_path | |||
end | |||
|
|||
def downgrade |
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.
This all looks good, however, for a re-factor we might make downgrade
and upgrade
into a more RESTful update
.
Nothing that should block a merge though
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.
Agreed with @wipegup remarks on update
vs downgrade
/upgrade
Adds the ability for an admin to upgrade and downgrade users from merchant to user and vice versa.
Also adds the ability for the admin to be redirected if they enter in the incorrect URI.
If they enter '/admin/users/:id' but the ID is of a merchant they are redirected to the admin merchant path. This is also the case for a user in the merchants URI
All tests passing
closes #56
closes #55
closes #54
closes #53