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

Hide 'Test Digest Mail' from production #4286

Closed
oorjitchowdhary opened this issue Dec 12, 2018 · 10 comments
Closed

Hide 'Test Digest Mail' from production #4286

oorjitchowdhary opened this issue Dec 12, 2018 · 10 comments
Labels
bug the issue is regarding one of our programs which faces problems when a certain task is executed

Comments

@oorjitchowdhary
Copy link
Member

Made from #4280

Problem

The Test Digest Mail button should not appear in the production server.

screenshot 113

Code link

<% if @profile_user && current_user && @profile_user == current_user %>
<%= form_tag "/users/test_digest_email", method: :post do %>
<%= submit_tag "Test Digest Email" %>
<% end %>
<% end %>

@uzorjchibuzor
Copy link
Contributor

Oh I think I commented on the wrong issue page @oorjitchowdhary can I take a stab at this issue? Adding environment conditional as suggested in the other thread should do it.

Sent with GitHawk

@oorjitchowdhary
Copy link
Member Author

oorjitchowdhary commented Dec 12, 2018 via email

@grvsachdeva grvsachdeva added the bug the issue is regarding one of our programs which faces problems when a certain task is executed label Dec 13, 2018
@grvsachdeva
Copy link
Member

Hi @oorjitchowdhary @uzorjchibuzor this button was added by @ViditChitkara for testing his GSoC project. I think, it should appear in front of moderators and admin only. So, please add condition accordingly. Thanks!

@grvsachdeva
Copy link
Member

I know it's for testing but you can change the button style to match other buttons.

@uzorjchibuzor
Copy link
Contributor

Hi @oorjitchowdhary @uzorjchibuzor this button was added by @ViditChitkara for testing his GSoC project. I think, it should appear in front of moderators and admin only. So, please add condition accordingly. Thanks!

@gauravano so it should appear in production if the user is an admin or moderator?

Sent with GitHawk

@uzorjchibuzor
Copy link
Contributor

uzorjchibuzor commented Dec 13, 2018

The way it currently is, the button only appear when not in production, it doesn’t take the user status into account.

Sent with GitHawk

@grvsachdeva
Copy link
Member

Yes @uzorjchibuzor it's fine to show button in production to moderators and admins.

@oorjitchowdhary
Copy link
Member Author

@uzorjchibuzor Would you like to work on this issue?
If yes, then go on!

@uzorjchibuzor
Copy link
Contributor

@uzorjchibuzor Would you like to work on this issue? ...

@oorjitchowdhary Thanks, I had a PR pending that removed the button from production I am going to push a commit that takes the status of the user into account instead of the environment. I will change the style to match other buttons too while at it.

Sent with GitHawk

@oorjitchowdhary
Copy link
Member Author

Oh great..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug the issue is regarding one of our programs which faces problems when a certain task is executed
Projects
None yet
Development

No branches or pull requests

3 participants