[MIG] auth_dynamic_groups to v10#96
Conversation
This reverts commit 4cb0d66548925693cb8f7a06546d8b9522a2e603.
remove deprecated view_type field on view declaration
|
PS: It's enough to review cfc3981, everything else already is in v8 |
NL66278
left a comment
There was a problem hiding this comment.
👍 Minor comments, not blocking. Just curious for the motivation to move this from the server-tools repo to server-auth.
Also might still be helpfull to squash adjacent Transifex commits.
| @@ -0,0 +1,27 @@ | |||
| <odoo> | |||
| <record model="ir.ui.view" id="view_groups_form"> | |||
There was a problem hiding this comment.
optional change:
id before model
| "license": "AGPL-3", | ||
| "complexity": "normal", | ||
| 'summary': 'Have membership conditions for certain groups', | ||
| "category": "Tools", |
There was a problem hiding this comment.
please add the website attribute with the value https://github.com/OCA/server-auth/
| "auto_install": False, | ||
| "installable": True, | ||
| "external_dependencies": { | ||
| 'python': [], |
There was a problem hiding this comment.
if you dont use the attribute, just delete it
|
thanks for the work 👍 |
cfc3981 to
4a66463
Compare
|
This PR has the |
Syncing from upstream OCA/server-auth (8.0)
This module allows defining groups whose membership is a condition expressed as
python code. For every user, it is evaluated during login if she belongs to
the group or not.
Configuration
Check
Dynamicon a group you want to be dynamic. Now fill in the condition,using
userwhich is a browse record of the user in question that evaluatestruthy if the user is supposed to be a member of the group and falsy if not.
There is a constraint on the field to check for validity if this expression.
When you're satisfied, click the button
Evaluateto prefill the group'smembers. The condition will be checked now for every user who logs in.
Usage
We have a group called
Amsterdamand want it to contain all users fromcity of Amsterdam. So we use the membership condition
Now we can be sure every user living in this city is in the right group, and we
can start assigning local menus to it, adjust permissions, etc. Keep in mind
that view overrides can also be restricted by a group id, this gives a lot of
possibilities to dynamically adapt views based on arbitrary properties