account: Add employee property.

This commit is contained in:
Ricky Ramirez
2013-08-08 14:04:06 -07:00
parent 5312dc36f2
commit 75da61704b
2 changed files with 12 additions and 0 deletions

View File

@@ -174,6 +174,7 @@ class Globals(object):
'cassandra_seeds',
'admins',
'sponsors',
'employees',
'automatic_reddits',
'allowed_css_linked_domains',
'authorized_cnames',

View File

@@ -630,6 +630,17 @@ class Account(Thing):
'''
return setattr(self, 'received_trophy_%s' % uid, trophy_id)
@property
def employee(self):
"""Return if the user is an employee.
Being an employee grants them various special privileges.
"""
return (self.name in g.admins or
self.name in g.sponsors or
self.name in g.employees)
class FakeAccount(Account):
_nodb = True
pref_no_profanity = True