on 2020 Sep 30 5:26 PM
Hi Experts,
In order to hidden an entity’s property, I have created an artifact HANA table with data MASK.
I exposed this entity in my CDS model with @cds.persistence.exists
Everythins woks but when I do GET call by oData, this field is not hidden.
Checking in SQL console on the HDI container, the selected field is correcty hiden.
Maybe MASK functionality is not managed by CAP.
Is It planned to implemented it in the fucture?
I have try this workaround cause event .ON and .AFTER doesn’t works.
Thank you in advance
Alice
Request clarification before answering.
Hi Alice,
I tried it from scratch and it worked without any additional user permissions.
Here the model I used:
db/src/.hdiconfig - same as gen/db/src/.hdiconfig (generated after the first cds build command)
db/src/SERV_T.hdbtable
COLUMN TABLE SERV_T (
ID integer,
S nvarchar(100),
primary key ( ID )
)
db/src/SERV_V.hdbview
VIEW SERV_V AS SELECT ID,S FROM SERV_T
WITH MASK (S USING 'XXXX-XXXX-XXXX-XXXX')
srv/serv.cds
service SERV {
@cds.persistence.exists
entity T {
key ID:Integer;
S:String(100);
};
@cds.persistence.exists
entity V {
key ID:Integer;
S:String(100);
};
Build and deploy the project, write some data into the table T, and read from view V the masked data via the OData service:
.... "S": "XXXX-XXXX-XXXX-XXXX" ....
Reading from T returns the original data that I wrote.
Regards,
Vladislav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
9 | |
8 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.