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
removed test-digest-button for Users other than Admins and Moderators #4293
Changes from 8 commits
7f5481b
0e33a8a
08e5c6d
4d23f98
2f91a6f
b7101ba
cb8081a
b7d3c61
27cc723
1a97d90
25f53e7
3ad01a5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -233,11 +233,16 @@ | |||||
</div> | ||||||
</div> | ||||||
<% end %> | ||||||
<% if current_user.can_moderate? || current_user.role == "admin" %> | ||||||
|
||||||
<% if @profile_user && current_user && @profile_user == current_user %> | ||||||
|
||||||
<%= form_tag "/users/test_digest_email", method: :post do %> | ||||||
<%= submit_tag "Test Digest Email", class: "btn btn-primary" %> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
As secondary would look little lighter. What do you think? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the btn-secondary bootstrap class is grayish, but the btn-info in a bit lighter than the primary. I have gone with that. |
||||||
<% end %> | ||||||
|
||||||
<% 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 %> | ||||||
sashadev-sky marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
|
||||||
<hr /> | ||||||
|
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.
can_moderate
method checks for both admin and moderator&& current_user.can_moderate?
at below if where we are checking profile_user and current_userThere 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.
Thanks for the clarification. I am going make changes. I am happy I got to work on this issue
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.
@uzorjchibuzor let me know if you need any help! I will be available over the next few hours
Also I have one more change I think you should add: