Hi Cédric,

El 25/01/18 a las 12:36, Cédric Krier escribió:
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..

Well, I think it's not strange if the idea is to sell Tryton as SAAS. Probably you will want to give to the customer the possibility to create or modify users, but for example, you will not want him to access to the Administration group (if the customer grant access to that, it could activate modules).


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

mmm.. If I understand right, I will need to restrict also the roles that the user could manage.

Thanks!
--
Luciano Rossi - lu...@gcoop.coop
http://gcoop.coop - Cooperativa de Software Libre
Julián Alvarez 958 CABA C1414DRT +54 11 4771-0055

Visitá www.tiendas.coop - www.nube.coop

--
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/ec43ad41-c013-29bc-c081-ebe83e6ccb78%40gcoop.coop.

Reply via email to