Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
5797 Näkymät

I have a model called Department, which contains two ManyToOne fields, one each for Manager and one for Publicist (there are more, but I have simplified the example).

I would like to create a new Security Record Rule so that each Manager can see only Users from their own department.

As far as I Know, to do this, I have to set the Object to Users when creating a new Record Rule. Where I struggle is how to iterate through all departments for each user.

Here is a Pseudocode example of what a want, the object is res.users

for each object for each department if(manager = user.id & publicist = object.id) display object

Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
2
elok. 24
1947
4
huhtik. 19
5331
1
helmik. 16
3339
1
marrask. 15
4925
3
elok. 15
10010