Skip to content

[All Versions] [base_user_role] Manual group assignment persistent when adding user to group #459

Description

@much-filipe-colaco

Module

base_user_role

Describe the bug

  • When a user has user roles defined, it is not possible to manually set groups on users as the module will override the groups list with the ones coming from the roles
  • This is achieved by res.users's create() and write() calling set_groups_from_roles()
  • Issue: There is no check on the res.groups's create() and write(), meaning if se set a user on the group's user list the group is actually assigned

To Reproduce

Affected versions: All versions

Steps to reproduce the behavior:

  1. Go to a user without roles, manually assign a group: group remains assigned
  2. Go to a user with roles, manually assign a group: group does not remain assigned
  3. Go to a group, add a user without roles to the list of users: group remains assigned
  4. Go to a group, add a user with roles to the list of users: group remains assigned (issue)

Expected behavior
On step 4, the group should not remain assigned, mimicking step 2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions