# HG changeset patch # User sylvain.thenault@logilab.fr # Date 1234814100 -3600 # Node ID 8a95510899121c399da107aa4bbede49f7ffd345 # Parent 5e5b296a657ee4da85002d7fbe2cb146c8ba9178# Parent 4dd6226d48c9050e877475557d009b445cc5a361 merge diff -r 5e5b296a657e -r 8a9551089912 common/selectors.py diff -r 5e5b296a657e -r 8a9551089912 doc/book/en/makefile --- a/doc/book/en/makefile Mon Feb 16 20:51:41 2009 +0100 +++ b/doc/book/en/makefile Mon Feb 16 20:55:00 2009 +0100 @@ -43,7 +43,7 @@ #apydoc: # epydoc --html -o epydoc/ -n ../server/*.py ../core/*.py ../common/*.py ../server/*/*.py ../modpython/*/*.py ../common/*/*.py apidoc: - epydoc --html -o apidoc -n "cubicweb" --exclude=setup --exclude=__pkginfo__ ../ + epydoc --html -o apidoc -n "cubicweb" --exclude=setup --exclude=__pkginfo__ ../../../ # run sphinx ### html: diff -r 5e5b296a657e -r 8a9551089912 doc/book/fr/makefile --- a/doc/book/fr/makefile Mon Feb 16 20:51:41 2009 +0100 +++ b/doc/book/fr/makefile Mon Feb 16 20:55:00 2009 +0100 @@ -43,7 +43,7 @@ #apydoc: # epydoc --html -o epydoc/ -n ../server/*.py ../core/*.py ../common/*.py ../server/*/*.py ../modpython/*/*.py ../common/*/*.py apidoc: - epydoc --html -o apidoc -n "cubicweb" --exclude=setup --exclude=__pkginfo__ ../ + epydoc --html -o apidoc -n "cubicweb" --exclude=setup --exclude=__pkginfo__ ../../../ # run sphinx ### html: diff -r 5e5b296a657e -r 8a9551089912 i18n/en.po --- a/i18n/en.po Mon Feb 16 20:51:41 2009 +0100 +++ b/i18n/en.po Mon Feb 16 20:55:00 2009 +0100 @@ -1816,6 +1816,9 @@ msgid "i18n_login_popup" msgstr "login" +msgid "i18n_register_user" +msgstr "register" + msgid "i18nprevnext_next" msgstr "next" @@ -2021,6 +2024,9 @@ msgid "login" msgstr "" +msgid "login or email" +msgstr "" + msgid "login_action" msgstr "log in" diff -r 5e5b296a657e -r 8a9551089912 i18n/es.po --- a/i18n/es.po Mon Feb 16 20:51:41 2009 +0100 +++ b/i18n/es.po Mon Feb 16 20:55:00 2009 +0100 @@ -1899,6 +1899,9 @@ msgid "i18n_login_popup" msgstr "identificarse" +msgid "i18n_register_user" +msgstr "registrarse" + msgid "i18nprevnext_next" msgstr "siguiente" diff -r 5e5b296a657e -r 8a9551089912 i18n/fr.po --- a/i18n/fr.po Mon Feb 16 20:51:41 2009 +0100 +++ b/i18n/fr.po Mon Feb 16 20:55:00 2009 +0100 @@ -1899,6 +1899,9 @@ msgid "i18n_login_popup" msgstr "s'authentifier" +msgid "i18n_register_user" +msgstr "s'enregister" + msgid "i18nprevnext_next" msgstr "suivant" @@ -2115,6 +2118,9 @@ msgid "login" msgstr "identifiant" +msgid "login or email" +msgstr "identifiant ou email" + msgid "login_action" msgstr "identifiez vous" diff -r 5e5b296a657e -r 8a9551089912 interfaces.py --- a/interfaces.py Mon Feb 16 20:51:41 2009 +0100 +++ b/interfaces.py Mon Feb 16 20:55:00 2009 +0100 @@ -238,3 +238,7 @@ def rss_feed_url(self): """return an url which layout sub-entities item """ +class ISIOC(Interface): + """interface for entities with sioc views""" + + diff -r 5e5b296a657e -r 8a9551089912 server/repository.py --- a/server/repository.py Mon Feb 16 20:51:41 2009 +0100 +++ b/server/repository.py Mon Feb 16 20:55:00 2009 +0100 @@ -491,6 +491,9 @@ try: if session.execute('EUser X WHERE X login %(login)s', {'login': login}): return False + if session.execute('EUser X WHERE X use_email C, C address %(login)s', + {'login': login}): + return False # we have to create the user user = self.vreg.etype_class('EUser')(session, None) if isinstance(password, unicode): @@ -502,6 +505,11 @@ self.glob_add_entity(session, user) session.execute('SET X in_group G WHERE X eid %(x)s, G name "users"', {'x': user.eid}) + # FIXME this does not work yet + if '@' in login: + session.execute('INSERT EmailAddress X: X address "%(login)s", ' + 'U primary_email X, U use_email X WHERE U login "%(login)s"', + {'login':login}) session.commit() finally: session.close() diff -r 5e5b296a657e -r 8a9551089912 vregistry.py diff -r 5e5b296a657e -r 8a9551089912 web/views/basecomponents.py --- a/web/views/basecomponents.py Mon Feb 16 20:51:41 2009 +0100 +++ b/web/views/basecomponents.py Mon Feb 16 20:55:00 2009 +0100 @@ -104,6 +104,10 @@ self.w(self.req._('anonymous')) self.w(u''' [%s]''' % (self.req._('i18n_login_popup'))) + # FIXME maybe have an other option to explicitely authorise registration + if self.config['anonymous-user']: + self.w(u''' [%s]''' + % (self.req._('i18n_register_user'))) else: self.w(self.req._('anonymous')) self.w(u' [%s]' diff -r 5e5b296a657e -r 8a9551089912 web/views/basetemplates.py --- a/web/views/basetemplates.py Mon Feb 16 20:51:41 2009 +0100 +++ b/web/views/basetemplates.py Mon Feb 16 20:55:00 2009 +0100 @@ -512,7 +512,7 @@ % html_escape(login_form_url(self.config, self.req))) self.w(u'
' % _('login')) + self.w(u' | ' % _('login or email')) self.w(u' | ') self.w(u' |
' % _('password')) |