Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubes
forgotpwd
Commits
68c4edf56656
Commit
31c7aab8
authored
Jul 20, 2010
by
Nicolas Chauvat
Browse files
port to 3.9 (closes #1193247)
parent
59e0be5aa81a
Changes
7
Hide whitespace changes
Inline
Side-by-side
__pkginfo__.py
View file @
68c4edf5
...
...
@@ -79,10 +79,9 @@ for dname in ('entities', 'views', 'sobjects', 'hooks', 'schema', 'data', 'wdoc'
# them to be included in the debian package
__depends_cubes__
=
{}
__depends__
=
{
'cubicweb'
:
'>= 3.
6.1
'
,
__depends__
=
{
'cubicweb'
:
'>= 3.
9.0
'
,
'python-crypto'
:
None
,
'PIL'
:
None
,
}
__use__
=
tuple
(
__depends_cubes__
)
__recommend__
=
()
data/external_resources
deleted
100644 → 0
View file @
59e0be5a
# -*- shell-script -*-
###############################################################################
#
# put here information about external resources used by your components,
# or to overides existing external resources configuration
#
###############################################################################
# CSS stylesheets to include in HTML headers
# uncomment the line below to use template specific stylesheet
# STYLESHEETS = DATADIR/cubes.forgotpwd.css
hooks.py
View file @
68c4edf5
...
...
@@ -3,7 +3,7 @@
from
datetime
import
datetime
from
cubicweb.selectors
import
i
mplements
from
cubicweb.selectors
import
i
s_instance
from
cubicweb.server
import
hook
from
cubicweb.sobjects.notification
import
NotificationView
...
...
@@ -32,7 +32,7 @@ class ServerStartupHook(hook.Hook):
class
PasswordResetNotification
(
NotificationView
):
__regid__
=
'notif_after_add_entity'
__select__
=
i
mplements
(
'Fpasswd'
)
__select__
=
i
s_instance
(
'Fpasswd'
)
content
=
_
(
'''There was recently a request to change the password on your account.
If you requested this password change, please set a new password by following
...
...
@@ -52,7 +52,7 @@ See you soon on %(base_url)s !
def
recipients
(
self
):
fpasswd
=
self
.
cw_rset
.
get_entity
(
self
.
cw_row
or
0
,
self
.
cw_col
or
0
)
user
=
fpasswd
.
reverse_has_fpasswd
[
0
]
return
[(
user
.
get_email
(),
user
.
property_value
(
'ui.language'
))]
return
[(
user
.
cw_adapt_to
(
'IEmailable'
).
get_email
(),
user
.
property_value
(
'ui.language'
))]
def
context
(
self
,
**
kwargs
):
return
{
...
...
schema.py
View file @
68c4edf5
...
...
@@ -26,3 +26,4 @@ class has_fpasswd(RelationDefinition):
}
subject
=
'CWUser'
object
=
'Fpasswd'
cardinality
=
'*1'
site_cubicweb.py
View file @
68c4edf5
...
...
@@ -3,12 +3,12 @@ options = (
{
'type'
:
'int'
,
'default'
:
30
,
'help'
:
'Forgot password link life time validity'
,
'group'
:
'forgotpwd'
,
'
input
level'
:
2
,
'group'
:
'forgotpwd'
,
'level'
:
2
,
}),
(
'forgotpwd-cypher-seed'
,
{
'type'
:
'string'
,
'default'
:
u
"this is my dummy forgotpwd cypher seed"
,
'help'
:
'seed used to cypher validation key sent in forgot password email link'
,
'group'
:
'forgotpwd'
,
'
input
level'
:
2
,
'group'
:
'forgotpwd'
,
'level'
:
2
,
}),
)
test/test_forgotpwd.py
View file @
68c4edf5
...
...
@@ -8,14 +8,14 @@
from
logilab.common.testlib
import
TestCase
,
unittest_main
class
DefaultTC
(
TestCase
):
def
test_something
(
self
):
self
.
skip
(
'this cube has no test'
)
#
class DefaultTC(TestCase):
#
def test_something(self):
#
self.skip('this cube has no test')
## uncomment the import if you want to activate automatic test for your
## template
#
from cubicweb.devtools.testlib import AutomaticWebTest
from
cubicweb.devtools.testlib
import
AutomaticWebTest
if
__name__
==
'__main__'
:
...
...
uiprops.py
0 → 100644
View file @
68c4edf5
STYLESHEETS
=
data
(
'cubicweb.forgotpwd.css'
)
Write
Preview
Supports
Markdown
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