Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Matevz Golob
erp5
Commits
b9ab4468
Commit
b9ab4468
authored
Jul 27, 2011
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extend API of ILoginAccountProvider to allow to take actions whenever a
password expire occurs.
parent
85278bdd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
product/ERP5/interfaces/login_account_provider.py
product/ERP5/interfaces/login_account_provider.py
+5
-0
product/ERP5/mixin/login_account_provider.py
product/ERP5/mixin/login_account_provider.py
+8
-0
No files found.
product/ERP5/interfaces/login_account_provider.py
View file @
b9ab4468
...
@@ -40,6 +40,11 @@ class ILoginAccountProvider(Interface):
...
@@ -40,6 +40,11 @@ class ILoginAccountProvider(Interface):
Notify an authentication failure.
Notify an authentication failure.
"""
"""
def
notifyPasswordExpire
(
**
kw
):
"""
Notify a password expire event.
"""
def
isLoginBlocked
(
**
kw
):
def
isLoginBlocked
(
**
kw
):
"""
"""
Is this login blocked?
Is this login blocked?
...
...
product/ERP5/mixin/login_account_provider.py
View file @
b9ab4468
...
@@ -47,6 +47,14 @@ class LoginAccountProviderMixin:
...
@@ -47,6 +47,14 @@ class LoginAccountProviderMixin:
method
=
self
.
_getTypeBasedMethod
(
'notifyLoginFailure'
)
method
=
self
.
_getTypeBasedMethod
(
'notifyLoginFailure'
)
return
method
(
**
kw
)
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'
)
security
.
declareProtected
(
Permissions
.
SetOwnPassword
,
'isLoginBlocked'
)
def
isLoginBlocked
(
self
,
**
kw
):
def
isLoginBlocked
(
self
,
**
kw
):
"""
"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment