Commit 20dba121 authored by HERBERT Ryan's avatar HERBERT Ryan

controllers/notification.py expired messages are no longer listed in info page for non admin users

parent f2b1d68b
......@@ -42,6 +42,9 @@ def info():
cache.ram.clear(regex=NOTIFICATION_CACHE_PREFIX + str(user_id))
notifications = db(db.notification).select(orderby=~db.notification.id)
if not auth.is_admin():
notifications = notifications.find(lambda row: row.expiration >= date.today())
return dict(message="Notifications",
query=query,
notifications=notifications)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment