cancel
Showing results for 
Search instead for 
Did you mean: 

CAP Access Control restriction with several roles

FabienHenique
Participant

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?

vitaly_kozyura
Participant
0 Kudos

Hi, Do you use Java or node.js runtime? What are the versions? Best regards, Vitaly Kozyura

FabienHenique
Participant
0 Kudos

Hello vitaly.kozyura,

Here are the details:

@sap/cds: 5.9.2

@sap/cds-compiler: 2.13.8

@sap/cds-dk: 4.8.2

@sap/cds-foss: 3.1.1

@sap/cds-mtx: -- missing --

@sap/cds-odata-v2-adapter-proxy: 1.8.11

@sap/eslint-plugin-cds: 2.3.5

@sap/hana-client: 2.12.20

@sap/xsenv: 3.2.1

@sap/xssec: 3.2.13

Node.js: v14.17.6

vitaly_kozyura
Participant
0 Kudos

Please test if the error still occurs with @sap/cds 5.9.5.

Accepted Solutions (0)

Answers (0)