diff options
| author | Jeremy Kersten <jke@odoo.com> | 2020-03-02 14:14:18 +0000 |
|---|---|---|
| committer | Martin Trigaux <mat@odoo.com> | 2020-03-21 10:23:32 +0000 |
| commit | 94f8f15036c3e5fec4aed9a7e50960bc7f190631 (patch) | |
| tree | d926cb95ab4641af45d4e96644c38b8d981fd413 /addons/website/static/src/xml | |
| parent | 92f9d9b21b7bdde796e6105ee53f83d71fde3044 (diff) | |
[FIX] website: make handle_visibility private
This commit:
- make handle_visibility a private function (even if not
exploitable in rpc easily since it uses request.website)
- encrypt the password in db (even if not critic, since this
password could be shared on twitter, ... it doesn't cost anything
to secure it a bit more)
- remove useless sudo, since handle_visibility does a sudo itself.
In the future, this notion of visibility should be handled on controller layer,
and no more on the View layer (during rendering)
closes odoo/odoo#48145
X-original-commit: 06e0e48217f25f17dff23331111f5dcb98e8cecd
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Diffstat (limited to 'addons/website/static/src/xml')
| -rw-r--r-- | addons/website/static/src/xml/website.pageProperties.xml | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/addons/website/static/src/xml/website.pageProperties.xml b/addons/website/static/src/xml/website.pageProperties.xml index 54b204fa103..e38a9555826 100644 --- a/addons/website/static/src/xml/website.pageProperties.xml +++ b/addons/website/static/src/xml/website.pageProperties.xml @@ -152,7 +152,10 @@ <div class="ml-1 input-group-prepend show_visibility_password" > <div class="input-group-text"><i class="fa fa-key"></i></div> </div> - <input type="text" t-att-value='widget.page.visibility_password ? widget.page.visibility_password : ""' class="form-control show_visibility_password" id="visibility_password"/> + <input type="password" id="visibility_password" + t-att-value='widget.page.visibility_password' + t-att-required="widget.page.visibility == 'password' ? 'required' : None" + class="form-control show_visibility_password"/> <div class="ml-1 input-group-prepend show_visibility_group"> <div class="input-group-text"><i class="fa fa-group"></i></div> </div> |
