Added the @ban and @unban commands to the default command sets, allowing an admin to filter access from users without outright deleting their accounts. The ban list is stored in the database, but the checking is not hard-coded in the server/portal, but done in the normal login command(s), meaning it can be customized easily. Also contrib/menu_login has been updated to check for banned connections.

This commit is contained in:
Griatch 2012-01-27 23:53:03 +01:00
parent e2b67b0ac4
commit 1d40f688e5
6 changed files with 196 additions and 6 deletions

View file

@ -193,7 +193,7 @@ def time_format(seconds, style=0):
def datetime_format(dtobj):
"""
Takes a datetime object instance (e.g. from django's DateTimeField)
and returns a string.
and returns a string describing how long ago that date was.
"""
year, month, day = dtobj.year, dtobj.month, dtobj.day