Skip to content

Commit

Permalink
Correct num_reports perm checks for Link JSON templates as well
Browse files Browse the repository at this point in the history
Thanks to a report by /u/wicro
  • Loading branch information
JordanMilne committed Aug 26, 2015
1 parent 9e22c22 commit 2e2625d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion r2/r2/lib/jsontemplates.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ def thing_attr(self, thing, attr):
return distinguished

if attr in ["num_reports", "report_reasons", "banned_by", "approved_by"]:
if c.user_is_loggedin and thing.user_is_moderator:
if c.user_is_loggedin and thing.can_ban:
if attr == "num_reports":
return thing.reported
elif attr == "report_reasons":
Expand Down

0 comments on commit 2e2625d

Please sign in to comment.