Contributors mailing list archives
Re: Modules for read only User Groupsby
Vauxoo, Moisés López Calderón
If you want a user with readonly for all models, you can create a group "readonly" and inherit the "ir_model_access.check" method to check if the user has this group so the permission is just read.
Something like this:
You can use the current groups way to enable menus and models permissions, but if you assign the new readonly group so, this user only will can read (not write, create, unlink) even if the original groups allow.
I hope this can be helpful for you.
Feel free to contribute it to OCA if you think that it is helpful
Disclaimer1: It is only a POC without a depth analysis.
Disclaimer2: Readonly group apply for all models. Maybe, it could be configurable making a few changes.
El mar., 12 may. 2020 a las 5:22, Pedro M. Baeza (Tecnativa) (<email@example.com>) escribió:
For me the good OCA module is one that allows this as a general switch, not having to create an specific module for each area (and leaving out possible specific modules). I think this can be done at ORM level overriding write/create or even lower layers, or _check_access.Regards.