Commit 31c7aab8 authored by Nicolas Chauvat's avatar Nicolas Chauvat
Browse files

port to 3.9 (closes #1193247)

parent 59e0be5aa81a
......@@ -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__ = ()
# -*- 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
......@@ -3,7 +3,7 @@
from datetime import datetime
from cubicweb.selectors import implements
from cubicweb.selectors import is_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__ = implements('Fpasswd')
__select__ = is_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 {
......
......@@ -26,3 +26,4 @@ class has_fpasswd(RelationDefinition):
}
subject = 'CWUser'
object = 'Fpasswd'
cardinality = '*1'
......@@ -3,12 +3,12 @@ options = (
{'type' : 'int',
'default': 30,
'help': 'Forgot password link life time validity',
'group': 'forgotpwd', 'inputlevel': 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', 'inputlevel': 2,
'group': 'forgotpwd', 'level': 2,
}),
)
......@@ -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__':
......
STYLESHEETS = data('cubicweb.forgotpwd.css')
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