summaryrefslogtreecommitdiff
path: root/addons/auth_signup/controllers/main.py
AgeCommit message (Collapse)Author
2018-08-13[IMP] website,*: support multiple websitesJoren Van Onder
This implements support to administer multiple websites. Although the core functionality already existed, managing multiple websites was fairly technical. In the interest of database updates and migration this attempts to keep duplicated data to a minimum. To do this the usual generic records are rendered unless some website-specific record exists that replaces it. Copy-on-write (COW) is used to create these website-specific records. Through this mechanism creating a website-specific record is delayed until necessary. A COW mechanism has been implemented on 4 models: ir.ui.view, website.page, website.menu and ir.attachment. These COW mechanisms are activated when editing data through the website (aka frontend). These frontend edits (e.g. with web_editor) will be website-specific, possibly creating a website-specific record when necessary. When editing data in the backend nothing special will happen, even when editing a generic record. Note that because of this mechanism also facilitates the ability to create new, uncustomized websites because the generic data is kept. Support is provided for a website to have any theme. Themes are fairly complex to handle. Standalone themes can depend on other standalone themes (e.g. theme_beauty depends on theme_loftspace) and themes usually modify some data of the themes they depend on. Because a theme can be installed on multiple websites, using website_id m2o fields does not work well. It would require duplicate data, making updates and migration harder. Because of this, data for themes (ir.ui.view and ir.attachment specifically) have a theme_id m2o. website has a theme_ids m2m that identifies all theme modules currently installed on it. Through these fields we figure out what to render. A theme is only fully uninstalled when it's no longer active on any website. The advantage of this approach is that upgrading or migrating theme data is no different from the single-website case. The website.published.mixin class was modified to handle multiple websites. A wizard was added in the backend to easily manage this for multiple website. Although not used anywhere in this commit, a 'website_id' variable has been added in the evaluation context of ir.rule. It allows to easily make any model multi-website aware, all that's needed is a custom website_id m2o field on a model and a custom record rule.
2018-07-02[MERGE] forward port branch saas-11.3 up to 4846c30c90aChristophe Simonis
2018-07-02[MERGE] forward port branch 11.0 up to 21b2617d6feChristophe Simonis
2018-06-28[FIX] auth_signup: display meaningfull error messageMartin Trigaux
Similar as 676022e3afdd for reset form
2018-05-29[MERGE] forward port branch saas-11.3 up to 37eed7c509fChristophe Simonis
2018-05-17[MERGE] forward port branch 11.0 up to 59a8a1cd8eeChristophe Simonis
2018-05-16[FIX] auth_signup: remove password from welcome messageOlivier Dony
Revision 054c68689b58f554e9433938644f2960720e08ef added by mistake the password of the new user in the welcome message that is sent to users who signed up with an invitation token. There is no need for this, the user has just chosen their password, and we should not send them a copy which could be compromised on the way to their inbox or later in their inbox. It may also give users the impression that their passwords is stored in cleartext in the database, even when that is not the case. This patch minimalizes changes to the template and its translations. For existing databases where the code is updated without re-syncing the template, the password will simply be missing in the message (until a resync of auth_signup module is done)
2018-05-04[IMP] auth_signup: change email invitation conditiondip-odoo
Currently if a user has already been invited you cannot invite him again via the web_settings_dashboard as it automatically tries to create a new user. This commit changes that behaviour in case you have the mail app installed odoo will now send an invitation email to the invited user as long as this user has never connected. 1) Mail app not installed: - if user is active > display error (this email is already in use) - if user not active > activate the user - if user doesn't exist > create new user 2) Mail app installed: - if user is active && state confirmed > display popup (this email is already in use) - if user is active && never connected > resend invitation mail - if user is inactive > activate the user - if user doesn't exist > create new user and send invitation mail This commit is related to task #54023 Closes #23081
2018-01-16[REF] various: convert res.config.settings to use ir.config_parameter ↵Richard Mathot
integration This commit updates the various res config of Odoo addons to use the newly-introduced config_parameter field attribute.
2017-11-17[FIX] auth_signup: properly display the error messageJeremy Kersten
Was "Internal Error 500" Introduced at c3bf161 This closes #20941
2017-11-07[MERGE] forward port branch saas-16 up to 5f9c3f51a8bChristophe Simonis
2017-11-01[FIX] auth_signup: correct leftover from 6d16915d397db3d92795a19800f697226dcbc75Olivier Dony
The /web/signup controller was also supposed to get the special frame header, like all sign-in/up pages.
2017-10-30[FIX] auth_signup: properly display the error messageMartin Trigaux
Was "('Passwords do not match; please retype them.', '')" Introduced at 676022e3
2017-09-27[IMP] website*: clean sitemap + add method to declare sitemap function.Jeremy Kersten
Don't add useless routes or route that will return 404. Improve generate function from ModelConverter to have a better management of query_string. Now we have an helper sitemap_qs2dom that will analyse the current route and check if query string is plausible and if yes, generate a domain, when the query_string don't seems to match the route, we return a Falsy domain. Before this commit, if qs was /product/ipad, enumerate_page check for each modelconverter of the route a name ilike '/product/ipad'. Now we check all routes that contains product and one converter that match ipad or routes that contains ipad and one converter that match product. This commit a new way to declare the sitemap for a route. def sitemap_xx(env, rule, query_string): yield {'loc': '/my_url'} @http.route(..., sitemap=sitemap_xx) In this case, only the loc returned by this function will be in the sitemap for all rules. You can pass sitempa=False, if you don't want that route are into the sitemap
2017-08-20[FIX] P3: remove pycompat.{keys,items,values} helpersOlivier Dony
Now that we're closer to switching to P3 for good, these helpers have outlived their usefulness, and mostly add noise. All remaining dict.iter*() or dict.view*() must be converted to the normal keys(), values() or items() calls. Whenever the result is likely to be used for more than the scope of a loop, or when the dict needs to be modified during iteration, the calls must be wrapped in a ``list()``, to protect the new P3 semantics. Those cases are very exceptional. Also removed some dead code or improved the API to remove unnecessary conversions.
2017-07-06[IMP] auth_signup: various usability improvements in signup processDenis Vermylen
* allow new signup on invalid token * relabel signup buttons * send a welcome email upon signup with a signup token. This way, should the token somehow be usurped by someone else, the original partner's email address will be notified. (before the usurper can change the email)
2017-07-06[IMP] web, auth_signup: add signup and login values to sessionDenis Vermylen
When you receive an url with parameters * auth_signup_token: uuid * auth_login: login those will be stored in the session and used * when the user will want to sign up in order to be linked to the right partner; * when he logs in so he's sure to log in with the right account + autofill is nice This commit only adds the support, future commits will support its use.
2017-07-06[IMP] auth_signup: display meaningfull and translated error messagesDenis Vermylen
Since 5425316eff19e7ae716aafdb730c92d1b3ea2abb errors when signing up will only display two messages: * "Another user is already registered using this email address." or * "Could not create a new account." While Odoo creates a multitude of other comprehensible error messages such as * "Passwords do not match; please retype them." * "Signup token '%s' is no longer valid" This commit now separate UserError and AssertionError from SignupErrors. Those are still hidden in a general message (see 5425316eff19e7ae716aafdb730c92d1b3ea2abb for reasons) while the other ones are fully displayed. This commit also improves translations of messages.
2017-05-16[MERGE] Forward-port saas-16 up to 5afe894f440eff3b58134d14fa7c9b43b19fe88bOlivier Dony
2017-05-16[MERGE] Forward-port saas-15 up to 878fbc75ff9ebade92f43748500e64350367a824Olivier Dony
2017-05-16[MERGE] Forward-port 10.0 up to 1545995b393a1d347c6c1988da03dd1c6f1ea037Olivier Dony
2017-05-12[FIX] P3: Exception.message removedXavier Morel
2017-05-10[FIX] P3: list -> iterable builtins (#16811)xmo-odoo
In Python 3: * various builtins and dict methods were changed to return view/iterable objects rather than lists * and the separate Python 2 view/iterable builtins and methods were removed altogether This is problematic when using these items as list (which the happens repeatedly in Odoo), but more viciously when iterating *multiple times* over them (which also happens, which I've messed up multiple times while writing this, and which is a pain to debug even when you've just created the issue). Convert all code using these to semantics-matching cross-version helper functions to get the LCD behaviour between P2 and P3, and forbid the builtins via lint. issue #8530
2017-05-05[FIX] auth_signup: properly log password reset requestsOlivier Dony
2017-04-11[#8530] convert exception handlers to except..as syntaxXavier Morel
Futurize fixers: * lib2to3.fixes.fix_except
2017-03-27[FIX] web: no frames on login/preferences screenOlivier Dony
We generally consider this a low priority issue as it is social-engineering based and many easier options exist for targeting gullible users. Nevertheless, protecting a couple of obvious pages does not hurt.
2017-01-03[REF] ir_config_parameter: remove `group_ids` and simplifyRaphael Collet
Add `sudo()` to call `get_param` where necessary, and make the web client use a controller instead of directly accessing parameters.
2017-01-03[IMP] base, *: tighten `ir.config_parameter` access rightsRaphael Collet
Add `base.group_system` on existing parameters: - `auth_signup.allow_uninvited`, - `auth_signup.reset_password`, - `auth_signup.template_user_id`, - `google_redirect_uri`, - `mail.bounce.alias`, - `mail.catchall.alias`, - `mail.catchall.domain`.
2016-12-09[MERGE] forward port branch 9.0 up to 9c8422aChristophe Simonis
2016-12-09[MERGE] forward port branch saas-6 up to 75e7f0dChristophe Simonis
2016-12-09[MERGE] forward port branch 8.0 up to 5ece76bChristophe Simonis
2016-12-09[FIX] auth_signup: display full error messagesergiov
When the user name entered hasn't an email specified the error message wasn't displayed in the reset view. The error message was in e.name, not e.message
2016-01-27[MERGE] forward port of branch saas-8 up to 7e44ddcChristophe Simonis
2016-01-13[FIX] all: construction of translations lookupMartin Trigaux
When evaluated, the translation function never finds a match if a variable is integrated into the untranslated text. SHAME! :bell: :raising_hand:
2016-01-07[MERGE] forward port of branch saas-8 up to 99b6cd8Christophe Simonis
2016-01-05[MERGE] Forwardport of branch saas-6 up to c649bb0dfMartin Trigaux
2015-12-30[MERGE] Forwardport of branch 8.0 up to 6efc3712Martin Trigaux
2015-12-16[FIX] auth_signup: no SQL error for duplicated userJairo Llopis
In case of registration with an already existant user, an SQL error 'duplicate key value violates unique constaint res_users_login_key...' Replace by a more user friendly error. Fixes #10068, opw 659913
2015-12-16[MIG] auth_signup: Migrated into new api.Kinjal Mehta
2015-12-16[MOVE] auth_signup: Moved files in related models and views directory.Kinjal Mehta
2015-11-17[IMP] auth_signup: reset password formMartin Geubelle
* Hide 'back to login' when there is a token * Hide the form when the token is invalid
2015-11-06[FIX] auth_signup: use request lang on signup if supportedDenis Ledoux
When a user signs up, when the according option is enabled in the General Settings `Allow external users to sign up` Use the request lang (the partner browser lang) to sign up only if this language is installed in the database. opw-654007
2015-07-14[FIX] auth_*: Authentification ain't a wordMartin Trigaux
.. just like "ain't" by the way. Courtesy of Lionel Sausin
2015-06-25[MERGE] forward port of branch saas-6 up to 81b5c60Christophe Simonis
2015-06-18[MERGE] forward port of branch 8.0 up to ed3065eChristophe Simonis
2015-06-17[FIX] auth_signup: set request lang to created user.Christophe Simonis
2015-06-02[LEGAL] Use global LICENSE/COPYRIGHT files, remove boilerplate textOlivier Dony
- Preserved explicit 3rd-party copyright notices - Explicit boilerplate should not be necessary - copyright law applies automatically in all countries thanks to Berne Convention + WTO rules, and a reference to the applicable license is clear enough.
2014-12-31[REF] remove vim modelines and resulting trailing blank linesLeonardo Donelli
Let 2015 be a year without modelines! cf #4174
2014-05-13[IMP] Invert multilang logic in route decorator. True by default, can be set ↵Fabien Meghazi
to False explicitlty
2014-03-24[MERGE] forward port of branch saas-3 up to revid 9345 ↵Christophe Simonis
dle@openerp.com-20140324110349-e82t1bmmtjqbl85k bzr revid: chs@openerp.com-20140324133811-4az1kvbznd26seow