22 Commits

Author SHA1 Message Date
Víctor Martínez
a4bc60ae79 [IMP] base_user_role: Improve tests to avoid false errors (ids in different order) 2025-01-29 13:55:27 +01:00
Jairo Llopis
0801cdba73 [FIX] base_user_role: Improve tests resiliency
These 2 tests were checking the exact set of groups a user should have.

If these tests are ran in a database where a module is previously installed which adds more groups to the base role, these exact group sets would be inexact, although the behavior that is being tested was actually properly working.

With this patch, basically I'm testing if the user contains the groups from the roles, not the exact role set expected. It should work in integration scenarios.

@Tecnativa TT20468
2025-01-29 13:55:27 +01:00
Jesus Ramoneda
795eb44efd [IMP] base_user_role: Adding alert in user when role is used 2024-10-21 08:09:18 +02:00
ArnauCForgeFlow
a5abf9eaba [15.0][IMP] base_user_role: action to group groups into a role 2024-10-21 08:09:18 +02:00
Raf Ven
e613f57e94 [MIG] base_user_role: Migration to 17.0 2024-10-21 08:09:18 +02:00
Guillaume Pothier
5921ddff03 Use kwargs in with_context, as per pre-commit recommendation 2024-10-21 08:09:18 +02:00
Guillaume Pothier
b7ed210c8d Add test for the create role from user wizard 2024-10-21 08:09:18 +02:00
Kiril Vangelovski
add0c02edf [FIX] base_user_role: tests - include trans_implied_ids
The unlink tests miss to add `trans_implied_ids` which is accounted
for when reseting the groups.
2024-10-21 08:09:18 +02:00
SilvioC2C
bd8e282657 FIX base_user_role: update tests 2024-10-21 08:09:18 +02:00
KevinKhao
56b60058a7 [FIX] base_user_role: remove multicompany functionality 2024-10-21 08:09:18 +02:00
Sébastien BEAU
1bc5a8a518 [IMP] Fix edition of role 2024-10-21 08:09:18 +02:00
Jesús Alan Ramos Rodríguez
324fe8d97d [MIG] base_user_role: Migration to 14.0 2024-10-21 08:09:18 +02:00
sebalix
a67a8aa56a [IMP] base_user_role: black, isort 2024-10-21 08:09:18 +02:00
Pierrick Brun
9bf77f52c3 [IMP] make base_user_role_line company dependent 2024-10-21 08:09:18 +02:00
elicoidal
fc347013f1 Switch AGPL to LGPL license 2024-10-21 08:09:18 +02:00
Duc Dao
da0197b6ef [MIG] base_user_role: Migration to 12.0 2024-10-21 08:09:18 +02:00
Benjamin Willig
2da61caa7c [IMP] Use default user to define default roles to create for a new user 2024-10-21 08:09:18 +02:00
Duc Dao
3142b9eb14 [MIG] Update test cases for testing (unlink role and role line) to new api 2024-10-21 08:09:18 +02:00
sebalix
1c2d2c69d3 [FIX+IMP] base_user_role: Several things:
* FIX: Update users' groups when a role is deleted
* IMP: add some test cases to check user's groups when its last role line is removed
* FIX: ensure that the user's groups are updated when its last role line is removed
2024-10-21 08:09:18 +02:00
Duc Dao
185d344943 [MIG] base_user_role: Migration to 11.0 2024-10-21 08:09:18 +02:00
Adrien Peiffer (ACSONE)
575014d391 [MIG] base_user_role: Port to 10.0 2024-10-21 08:09:18 +02:00
Sébastien Alix
7f54d56042 8.0 - New module 'base_user_role' to manage user roles efficiently (#608)
* [ADD] New module 'base_user_role'

* [FIX] base_user_role - Review

* [FIX] base_user_role - Review s/is_active/is_enabled/

* [FIX] base_user_role - Review s/is_active/is_enabled/

* [IMP] base_user_role - Translations updated (template + FR)

* [FIX] base_user_role - Lint
2024-10-21 08:09:18 +02:00