Plots2: Hide 'Test Digest Mail' from production

Created on 12 Dec 2018  ·  10Comments  ·  Source: publiclab/plots2

Made from #4280

Problem

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

screenshot 113

Code link

https://github.com/publiclab/plots2/blob/58d5ea84462f6117ce55830aeb8657eca3e5ac7a/app/views/users/profile.html.erb#L237-L241

bug

All 10 comments

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

@sidharthbansal and @gauravano may be able to help more here..

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!

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

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

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

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

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

@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

Oh great..

Was this page helpful?
0 / 5 - 0 ratings