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

Bug/4592 - Hide Environment column on Payment Methods page when user is not admin #5827

Conversation

jeduardo824
Copy link
Contributor

What? Why?

Closes #4592

On the table in the Payment Methods page, we have a column "Environment" that is kind of "tech-oriented" information. This PR hides the column when the user is not an admin.

What should we test?

Check if the column "Environment" is displayed when the user is admin and hidden when it is not.

Release notes

Hide the column "Environment" from the Payment Methods page in the admin section when the user is not a super admin.

Changelog Category: Changed

Copy link
Contributor

@luisramos0 luisramos0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks!
You can use the admin_user factory as explained below 👍

spec/support/request/authentication_workflow.rb Outdated Show resolved Hide resolved
@jeduardo824 jeduardo824 force-pushed the bug/remove-environment-column-when-user-is-not-super-admin branch 2 times, most recently from b4a0aee to ed9b5b6 Compare August 2, 2020 22:15
Copy link
Contributor

@sauloperez sauloperez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for another useful contribution @jeduardo824 !

@jeduardo824 jeduardo824 force-pushed the bug/remove-environment-column-when-user-is-not-super-admin branch from edabfe6 to 71876ca Compare September 4, 2020 11:48
Copy link
Contributor

@luisramos0 luisramos0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome, thank you!

@filipefurtad0
Copy link
Contributor

Hi @jeduardo824 ,

I checked that the Environment column was visible both as Admin (see pic below) and as Superadmin, in the Payment Methods page (/admin/payment_methods).

image

After staging the PR, it was observed that the Environment column was hidden from Payment Methods (pic below):

image

...but remained visible, when logged-in as Superadmin (pic below):
image

All good here! 🎉
Thank you Eduardo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Payment Methods Table in Dashboard does not display in Plain Language
4 participants