UserSessionSource in Frontend UI (React)


Is there any way to get the UserSessionSource for a user or another way to access a user’s session attributes in the React JS frontend client?

Can anyone help me out with this?

Can I somehow use the src/cuba/entities/base/sec$SessionAttribute.ts?

I see this using Role as an example, but not sure how I can get the Role parameter to use the function on.


You can expose a service method or create a custom REST controller to retrieve session attributes.