Skip to Content
1
May 03, 2022 at 03:21 PM

CAP Access Control restriction with several roles

403 Views Last edit May 03, 2022 at 03:22 PM 3 rev

Hello CAP community,

I have a CDS where I have defined the following restriction:

@(restrict:[ 

{ grant: ['*'], to: 'Operator', where: 'source_syst = $user.act and SiteRef.ID = $user.loc' }, 

{ grant: 'READ', to: 'Audit', where: 'source_syst = $user.act_audit and SiteRef.ID = $user.loc_audit' } ])<br>

When a user has only 1 role is assigned, restriction is correct.

When both roles are assigned, no data are available.

Any idea?