"Approval" menu item should only be visible to Manager role

Hi Community,

How to make the menu item visible to manager role. The Approval menu item is visible on both employee and manager role.

I have managed the roles using the roles tab in properties. I want the menu item to be visible to manager


Solution

Instead of using js, you can also use a Data Action to check for Roles, and use the Output of the DataAction inside an If, or the Visible property of a widget, for example.

It's an alternative way, and probably an easier one for a Beginner.

Thankyou Pedro

Hello @Ritesh Ghate 

You have here one of the solutions where The person has the same problem!!

https://www.outsystems.com/forums/discussion/62886/reactive-web-application-check-role/

Then you  use the attribute visible and the local variable to say if the current user is a manager or not and if that menu can be visible

You can do this by doing this


If you don't know how to put your self as manager to try, you have to go to the Users and give your self the role.

https://"your url of your server"/Users/

https://"your url of your server"/Users/

And you have here the oml!

I hope it helped you! :)

Regards,

Márcio C.

CheckRoleManager.oml

Solution

Instead of using js, you can also use a Data Action to check for Roles, and use the Output of the DataAction inside an If, or the Visible property of a widget, for example.

It's an alternative way, and probably an easier one for a Beginner.

Thankyou Pedro

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