[(Unofficial) OutSystems Forge API Example] How can I set Visible Property to CheckOSMDbAdminRole(UserId:) in Reactive.
Forge component by Miguel 'Kelter' Antunes
Application Type
Reactive
Service Studio Version
11.10.17 (Build 41112)
Platform Version
10.0.1113.0

How can I set Visible Property to CheckOSMDbAdminRole(UserId:) in Reactive.

I mean to say I want to hide a link from all users only admin can see that link ,how to do it in reactive.

Solution

Hi Utkalika Majhi,

In Reactive the paradigm is different from Traditional Web. For Reactive/Mobile apps you can use the javascript API to fetch the roles (use the OnReady action). You then assign them to screen variables, and use those variables to control the visibility of the screen elements. 

Be aware that for Reactive/Mobile apps everything on the client side can be tampered. Consider reading the article Securing Your Reactive and Mobile Apps (outsystems.com).


I hope this can help you.

Cheers,

António Pereira

Thank you.I have did it.

But I have another query suppose I want 2 roles Admin and Librerian. I have made a BookIssue button i want that all register user can see that button except Librerian and Admin.Is this possible to do using javascript API.

The Javascript API should only be used inside of the action flow. 

To have that same logic you can do something like the following example. In the OnReady action:

and in the screen:


Was able to help you?

Cheers,

António Pereira

Thank you so much.this solution helped me a lot.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.