On 2018-01-25 11:24, Luciano Rossi wrote: > Hi! > > I need to create an interface to manage the users. For now, I add to my > module the menu item Administration -> Users. > > The problem that i'm having, is that I want to restrict the groups that > the user can add or remove from the groups field (many2many). > > I added a restriction to the groups field, modifying the definition of > the domain attribute of the groups field, so when choosing the groups to > be added, it will restrict the list of them. But, I don't know how I can > restrict the lines (groups) that the user can remove. > > For example, the user can add to the user the groups Accounts and > Purchase. But, if the user already has the group Sale, I do not want > that this group to be remove it. > > Any idea?
For me, this is strange. If a user can add some groups to its profile, I do not see why not add all the allowed to the user by default so he does not need to edit himself this sensitive field. I see no reason a user will want to remove himself from some groups and thus restrict himself his access rights.. Maybe what you are looking for is an abstract level above the group to ease the management. Sebastian has started to work on something like that: https://bugs.tryton.org/issue7003 -- Cédric Krier - B2CK SPRL Email/Jabber: [email protected] Tel: +32 472 54 46 59 Website: http://www.b2ck.com/ -- You received this message because you are subscribed to the Google Groups "tryton" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton/20180125153627.GI23162%40kei.
