github.io/assets/apprentice/security/accesscontrol-fix.py

9 lines
184 B
Python
Raw Normal View History

class AccessControl:
current_user = None
...
def get_current_user(self):
if self.current_user.deleted is None:
return self.current_user
else:
raise Forbidden