Files
odoo_source/addons/website_event/controllers
Romain Derie 7ae60a7261 [IMP] website, *: fix wrong method naming
* website_event, website_slides

Note that `restricted_editor` is the new technical name used instead of
`publisher`

Before this commit, the `is_restricted_editor()` method was actually
checking for `designer` rights and not `restricted editor` ones.
Indeed, a restricted editor (previously publisher) never had the write
right on ir.ui.view.

Despite the method name being wrong, it was still correctly used where
we actually checked for designer rights and not publisher/restricted
editor ones.

Also, the method was checking for write access on ir.ui.view instead of
checking directly if the user had the related group.
While it wasn't really wrong, it was also including people who would
have the write right on ir.ui.view but were not part of the designer
group.
This doesn't really makes sens, as we don't want someone which received
that write right on ir.ui.view from another module (not related to the
website) to be considered as a website admin -> we don't want to show
them website admin UI and stuff like that.

The method could have simply be renamed to `is_designer()` and could
have just checked for `has_group(designer)`, but having such an helper
seems overkill, we would end up with as many utils as there is groups.

At the end, this PR:
- removes the confusing util method
- replace it by has_group checks

Part-of: odoo/odoo#98200
2022-08-31 23:50:06 +02:00
..