mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-28 08:17:58 -05:00
Allow all employees to distinguish as admin.
This commit is contained in:
@@ -96,7 +96,10 @@ class LinkButtons(PrintableButtons):
|
||||
# do we show the distinguish button? among other things,
|
||||
# we never want it to appear on link listings -- only
|
||||
# comments pages
|
||||
show_distinguish = (is_author and (thing.can_ban or c.user_special_distinguish)
|
||||
show_distinguish = (is_author and
|
||||
(thing.can_ban or # Moderator distinguish
|
||||
c.user.employee or # Admin distinguish
|
||||
c.user_special_distinguish)
|
||||
and getattr(thing, "expand_children", False))
|
||||
|
||||
kw = {}
|
||||
|
||||
@@ -934,9 +934,7 @@ class VSrModerator(Validator):
|
||||
|
||||
class VCanDistinguish(VByName):
|
||||
def run(self, thing_name, how):
|
||||
if c.user_is_admin:
|
||||
return True
|
||||
elif c.user_is_loggedin:
|
||||
if c.user_is_loggedin:
|
||||
item = VByName.run(self, thing_name)
|
||||
if item.author_id == c.user._id:
|
||||
# will throw a legitimate 500 if this isn't a link or
|
||||
@@ -947,6 +945,8 @@ class VCanDistinguish(VByName):
|
||||
return True
|
||||
elif how in ("special", "no") and c.user_special_distinguish:
|
||||
return True
|
||||
elif how in ("admin", "no") and c.user.employee:
|
||||
return True
|
||||
|
||||
abort(403,'forbidden')
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
${distinguish_setter('no')}
|
||||
 
|
||||
|
||||
%if c.user_is_admin:
|
||||
%if c.user.employee:
|
||||
/ 
|
||||
${distinguish_setter('admin')}
|
||||
 
|
||||
|
||||
Reference in New Issue
Block a user