Quantcast
Viewing all articles
Browse latest Browse all 3285

User Provider (Manage user profiles) in xsodata (xsjs)

Hi community,

 

I would like to manage user profiles in my xsodata services.

 

With HCP_GRANT_ROLE_TO_USER command, I can grant access to my services to several users. For example, if I do :

 

CALL "HCP"."HCP_GRANT_ROLE_TO_USER"('pA.xxx.roles::user', 'pA');

CALL "HCP"."HCP_GRANT_ROLE_TO_USER"('pB.xxx.roles::user', 'pB');


Users pA and pB can consume the xsodata service.


In this service, I would like to know which is the current user to manage security.


Example :


if ( user = 'pA' ) {

     $.response.setBody('OK');

} else {

     $.response.status = 'Error';

     $.response.setBody('KO');

}


I can't find any documentation on this, I just read this thread but it's for Java Applications.


May you help me please?


Best regards,


Severin


Viewing all articles
Browse latest Browse all 3285

Trending Articles