on 2021 Feb 23 5:38 AM
Hi,
Requirement - In my UI5 application, based on the catalog assigned for the Tile in the Fiori launchpad, i need to send the different status to the backend
Ex: If my tile in the FLP is assigned with ADMINISTRATOR Catalog then status '000010' should be send otherwise status '000020' should be assigned.
Question - How to find out the assigned catalog when i open the particular application(By clicking on the TILE through FLP).
You can do it easily in two ways:
1. Create two tiles one for the administrator and the other for a normal user, then use pass different parameters at tile level or if you will create two target mappings, then you can also pass parameters there. Then based on the parameters you can find out which type of user he is.
2. In the backend or from the front end, read if the user has the role: ADMIN or XYZ is assigned based on that pass the status.
If you still insist on find the catalogs of the user, you can use this service. Still i wouldn't recommend this option also and would suggest option1
/sap/opu/odata/UI2/PAGE_BUILDER_PERS/Pages('%2FUI2%2FFiori2LaunchpadHome')/allCatalogs
I would prefer the first option as it will be clean & you will be utilizing the power of tiles & parameters.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
grzegorz.malewski you are right, I meant two target mappings with two tiles, of course they will be different catalogs. and yes, frontend is not secure, so better from backend, but still, it is better to go with first option I believe or is it the bakcend role determintation.?
I feel it would be backend role & stauts determination, because, from frontend, user can still manipulate the data. So i will change by preferred option to option 2, using backend role determination
Greg Malewski, his requirement is based on the catalog assigned to the user, he needs to send the status, which is a valid requirement.
But now I saw your comment again and came to a different conclusion.
I would still prefer to do this in the backend though. Instead of querying the role(which he again needs to maintain that role in a config table), I think it is better to create an authorization object and assign it to the roles of Administrator and the general user. So the OP can assign this authorization object to the role of Administrator. This way, while saving the data in the backend, OP can do an authorization check and if it is a success he can pass the required status else the normal status.
What do you say?
PS: I am not trying to argue, this topic looks interesting and I am very happy that this discussion is leading to a positive outcome. I hope you are not taking this in the wrong way.
No worries, I'm okay with discussion 🙂 Please see my comment above. Let's have more insight from the author.
User | Count |
---|---|
66 | |
10 | |
8 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.