Ignore:
Timestamp:
6 Nov 2015, 05:43:37 (9 years ago)
Author:
Henrik Bettermann
Message:

Implement portal maintenance mode.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/authentication.py

    r12926 r13394  
    113113        """Check whether the given `password` matches the one stored by
    114114        students or the temporary password set by officers.
    115 
    116         We additionally check if student account has been suspended.
    117         """
     115        We additionally check if student account has been suspended
     116        or if the portal is blocked.
     117        """
     118        try:
     119            blocker = grok.getSite()['configuration'].maintmode_enabled_by
     120            if blocker:
     121                return False
     122        except TypeError:  # in unit tests
     123            pass
    118124        if not isinstance(password, basestring):
    119125            return False
Note: See TracChangeset for help on using the changeset viewer.