我正在SAPUI5中创建一个计划应用程序,并将其部署到门户站点。我使用两个角色(PlanningUserRole和PlanningAdminRole)。我能否以某种方式检索SAPUI5应用程序中用户的角色,以便将其传递给Java后端?
我已经尝试了下面的代码,但是它没有给我任何关于角色的信息。
sap.ushell.Container.getService("UserInfo").getUser();发布于 2018-02-14 07:12:41
我自己找到了解决办法。我将SCP Portal角色和Java应用程序角色添加到授权组(Security->Authorization-> Groups)中。我给他们起了相同的名字。唯一的区别就是它的起源。但效果很好。
发布于 2018-02-12 16:32:20
为了使用此服务,您必须引导本文档https://sapui5.hana.ondemand.com/1.38.6/docs/api/symbols/sap.ushell.html中描述的引导程序。
<script src="/sap/public/bc/ui5_ui5/resources/sap/ushell_abap/bootstrap/abap.js"></script>
<script id="sap-ui-bootstrap" src=".../sap-ui-core.js"></script>https://stackoverflow.com/questions/48746321
复制相似问题