cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

[cds] - Error: Forbidden while starting cap application due to user lacks "support" role.

indireddysankar
Advisor
Advisor
0 Likes
453

Getting below error while starting cap application given in the golden path of capire. 

https://pages.github.tools.sap/cap/golden-path/develop/btp-app-create-ui-fiori-elements/start-applic...

Help me where should add this role ? and what user it is asking for ?is it my BTP sub account/S4Hana DB user ?

what password I should enter in the popup like shown in the image..

[cds] - Error: Forbidden
at requires_check (/home/user/projects/incident-management/node_modules/@sap/cds/lib/srv/protocols/http.js:54:32)
at Layer.handle [as handle_request] (/home/user/projects/incident-management/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/home/user/projects/incident-management/node_modules/express/lib/router/index.js:328:13)
at /home/user/projects/incident-management/node_modules/express/lib/router/index.js:286:9
at Function.process_params (/home/user/projects/incident-management/node_modules/express/lib/router/index.js:346:12)
at next (/home/user/projects/incident-management/node_modules/express/lib/router/index.js:280:10)
at http_log (/home/user/projects/incident-management/node_modules/@sap/cds/lib/srv/protocols/http.js:42:59)
at Layer.handle [as handle_request] (/home/user/projects/incident-management/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/home/user/projects/incident-management/node_modules/express/lib/router/index.js:328:13)
at /home/user/projects/incident-management/node_modules/express/lib/router/index.js:286:9 {
code: 403,
reason: "User 'siva.sankar.reddy.indireddy@sap.com' is lacking required roles: [support]",
user: User { id: 'siva.sankar.reddy.indireddy@sap.com', roles: {} },
required: [ 'support' ]

Accepted Solutions (0)

Answers (1)

Answers (1)

SoorajSudhakaran
Associate
Associate

You can add local users for testing as given in https://pages.github.tools.sap/cap/golden-path/develop/add-auth/add-authorization#add-users-for-loca...

In package.json, add

"cds": { "requires": { "[development]": { "auth": { "kind": "mocked", "users": {"alice": { "roles": ["support"] }, "bob": { "roles": ["support"] }} } } } },