1

I have an XSA SAPUI5 app which is used in a workflow scenario by 2 roles

  1. data capturer
  2. data approver

scopes and roles for each defined in xs-security.json

I want to determine which scopes a user has, i can do that in an api by calling @sap/xxsec checkScope

eg

 app.get('/isApprover', (req, res)=>{
   const isAuthorized = req.authInfo.checkScope('$XSAPPNAME.Approver');
   if (!isAuthorized) {
      res.status(403).send('Forbidden');
   }
 })

is there a function similar in SQLScript?

You can access the Roles Attributes via

SELECT SESSION_CONTEXT('XS_COSTCENTER') FROM DUMMY

Also would be handy to get the ORG and SPACE from a SQL call

Rufi
  • 2,529
  • 1
  • 20
  • 41
Jasper_07
  • 2,453
  • 2
  • 18
  • 23

0 Answers0