Ignore:
Timestamp:
6 Apr 2016, 10:27:11 (9 years ago)
Author:
Henrik Bettermann
Message:

Add portal maintenance mode.

See r13394, r13396, r13468.

Location:
main/waeup.ikoba/trunk/src/waeup/ikoba/customers
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.ikoba/trunk/src/waeup/ikoba/customers/authentication.py

    r13803 r13806  
    116116        customers or the temporary password set by the system.
    117117
    118         We additionally check if customer account has been suspended.
    119         """
     118        We additionally check if customer account has been suspended
     119        or maintenance mode is on.
     120        """
     121        try:
     122            blocker = grok.getSite()['configuration'].maintmode_enabled_by
     123            if blocker and blocker != self.name:
     124                return False
     125        except (TypeError, KeyError):  # in unit tests
     126            pass
    120127        if not isinstance(password, basestring):
    121128            return False
  • main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_browser.py

    r13066 r13806  
    492492        self.browser.getControl(name='SUBMIT').click()
    493493        self.browser.getLink('Process data').click()
     494        self.browser.getLink("Switch maintenance mode").click()
    494495        button = lookup_submit_value(
    495496            'select', 'customers_zope.mgr.csv', self.browser)
Note: See TracChangeset for help on using the changeset viewer.