diff options
| author | rde <rde@odoo.com> | 2017-09-15 12:36:59 +0200 |
|---|---|---|
| committer | Jeremy Kersten <jke@odoo.com> | 2017-09-15 15:29:37 +0200 |
| commit | 4ecbacaf59576a22ff45615a5aa5c67244e4fb93 (patch) | |
| tree | b1d38321d2838579ccb8adc2f3fcdd0765351fcc /addons/website/security/website_security.xml | |
| parent | 13a44d33bda1d7ff21e3de5de8b3c84f6a482a0d (diff) | |
[ADD] website: add new page management
website.page = old ir.ui.view with page=True
website.redirect is a new mechanism to replace in the futur the ir.attachment
mechanism of redirect.
From now, we don't have a specific /page controller to serve 'page'.
We use a new model website.page which is rendered if none route matches the url
and that the field 'url' on website.page matches the request.httprequest.path.
The order to serve a path is:
- Routes defines in controllers (/shop, /blog, ...)
- ir.attachment with name matching the path
- website.page with url matching the path
- website.redirect with url_from matching the path
- 404
To improve:
- allow regexp in website.redirect model
- allow to edit the view_arch from the page.management via redirect backend
(needed when traceback in the page, or when modifying a js/css/less/...)
Diffstat (limited to 'addons/website/security/website_security.xml')
| -rw-r--r-- | addons/website/security/website_security.xml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/addons/website/security/website_security.xml b/addons/website/security/website_security.xml index 2e7ad4cbe6f..99264d4e460 100644 --- a/addons/website/security/website_security.xml +++ b/addons/website/security/website_security.xml @@ -45,4 +45,10 @@ <field name="perm_create" eval="True"/> <field name="perm_unlink" eval="True"/> </record> + <record id="website_page_rule_public" model="ir.rule"> + <field name="name">website.page: portal/public: read published pages</field> + <field name="model_id" ref="website.model_website_page"/> + <field name="domain_force">[('website_published', '=', True)]</field> + <field name="groups" eval="[(4, ref('base.group_portal')), (4, ref('base.group_public'))]"/> + </record> </odoo> |
