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

Admin upgrade downgrade users #56 #165

Merged
merged 11 commits into from
Apr 8, 2019

Conversation

Vjp888
Copy link
Collaborator

@Vjp888 Vjp888 commented Apr 8, 2019

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

@@ -13,4 +16,19 @@ def update
merchant.save
redirect_to admin_merchants_path
end

def downgrade
Copy link
Collaborator

@wipegup wipegup Apr 8, 2019

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

Copy link
Collaborator

@whois-jon-peterson whois-jon-peterson left a 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

@cnodland cnodland merged commit feb5334 into master Apr 8, 2019
@cnodland cnodland deleted the admin_updgrade_downgrade_users_#56 branch April 8, 2019 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants