summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorNans Lefebvre <len@odoo.com>2019-07-29 12:49:55 +0000
committerfw-bot <otis@odoo.com>2019-09-19 12:49:11 +0000
commit7571b086bdfc58df90f204869d9bbfb138605efb (patch)
treecca830234d2820906bc20816ef644a61db5d6319 /addons/web/static/src
parentce7090001d104fb43afacfd64e48d182b0ff8761 (diff)
[FIX] base: fix portal rights update
Commit c3717f3018 added a (5, 0, 0) command when modifying groups_id of any non-internal user, to avoid the situation where the various implications would end up giving the portal user group_user rights. This risk is avoided by commit f206714af08, which added a constraint check_one_user_type, which would raise in that specific case. The last missing piece was 9badedcd98f; when groups are added through settings, they are added through the implied_groups of the group model. The (5,) command has the unfortunate side-effect to remove the portal group from a user if a write is triggered programmatically. If that happens, then the 'signing up' process end-destination is a 500 error. Now we simplify the logic that keeping the same behaviour for implied_ids for internal (group_user) and non-internal users. We keep the (5,) command in one case: if a user is demoted to portal or public, he may have groups should be reserved to internal users, but that do not imply group_user (which would raise). To avoid that, we remove all its groups, since there is no clear distinction between technical display groups and actual privilege-granting groups. opw 2041606 closes odoo/odoo#37144 X-original-commit: 29723e351d5dc5e5ea055c80da86f4e871909de9 Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
Diffstat (limited to 'addons/web/static/src')
0 files changed, 0 insertions, 0 deletions