Commit b9ab4468 authored by Ivan Tyagov's avatar Ivan Tyagov

Extend API of ILoginAccountProvider to allow to take actions whenever a

password expire occurs.
parent 85278bdd
......@@ -39,6 +39,11 @@ class ILoginAccountProvider(Interface):
"""
Notify an authentication failure.
"""
def notifyPasswordExpire(**kw):
"""
Notify a password expire event.
"""
def isLoginBlocked(**kw):
"""
......
......@@ -47,6 +47,14 @@ class LoginAccountProviderMixin:
method = self._getTypeBasedMethod('notifyLoginFailure')
return method(**kw)
security.declareProtected(Permissions.SetOwnPassword, 'notifyPasswordExpire')
def notifyPasswordExpire(self, **kw):
"""
Notify a password expire event.
"""
method = self._getTypeBasedMethod('notifyPasswordExpire')
return method(**kw)
security.declareProtected(Permissions.SetOwnPassword, 'isLoginBlocked')
def isLoginBlocked(self, **kw):
"""
......
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