Hi All,
Today, I would like to show how to configure the roles in Fiori launchpad Cloud foundry. In detail,
We can control the apps that will be displayed in the launchpad, based on the authorization check.
For instance, there are two apps in the FIORI launchpad.
We have two roles in the Application.
1. USER
2. ADMIN.
Fiori Launchpad should show strictly user-related apps if USER Login to the Application.
How to achieve the above scenario?.
Please follow the steps to do that.
Step1: Declare the scopes in xs-app.json
Step 2: Declare the Same scopes in xs-security.json in below formate.
Step 3. Create Roles in xs-security.json inside role-templates sections.
Please note that created roles will display in the Role Collection under your cloud account.
Step 4: Configure Authorization in the manifest.json in your HTML5 Module.
Add below code in the manifest.json: $XSAPPNAME.user was defined in scopes early in step 2
Step 5: Just repeat the above step for another app which is for Admin.
Step 6: Build and Deploy in your cloud foundry account
Step 7: Create Two Roles in Role Collection under the Security section
Step 8: Click on POC_Open_user Role and add Role Templates which you have created already in xs-security.json Please refer Step-3
Select the user role from the template section.
Step 9: Assign roles to the account Id in Trust Configurations.
Step 10: Please open your launchpad approuter URL. You can only see the USER related apps.
Fiori Launchpad Before applying Roles & Authorization
Fiori Launchpad After applying Roles & Authorization ( Assigned User role )
Conclusion: We can filter the apps in the Fiori launchpad Cloud Foundry based on the Roles.
I hope this blog post helps you during your development.
Thanks & Regards
Charan
Original Article:
https://blogs.sap.com/2020/03/12/configuring-roles-sap-fiori-launchpad-cloudfoundry/