I have a page and i have different Roles. I want to make the page readonly to specific roles?
Hello Prabinraj,
Hope you're doing well.
Associated to a Role, you have the Check<Role>Role action.
You may use the output of this action and control the features in your screen that should be available or not for certain roles.
As an example, let's say you have 2 roles: Admin and User.
The page will be available for both of them to read the data, but only Admins can change the data. You can use the CheckAdminRole action and use its output to control if the Save Button is available or not in the page (with an If widget in the screen).
Kind regards,
Rui Barradas
Hi Prabinraj,
What you could consider is to make a separate screen that is read only and assign the roles to it.
From a security point of view, create separate screen for create/edit/delete and another one for view only is a good practise.
It also allows you to style the read-only screen differently.
Regards,
Daniel
i have two roles Service agent 1 and Service agent 2,so service agent1 should able view and edit his page and view only for service agent 2's page " how can i build this procedure?
Your rephrased question still can be handled with my original reply.
Hello Prabinraj TP,
You can validate the role using CheckRole action.
You can show or hide the edit button/link based on the role.
It's totally based on how you build the screen; can you share your oml file to look closer at the issue you are facing and suggest a solution?
Riyaz
Hello
You can use a data acion to call the check role action into it , then just take an output from it a boolean type, it will return either true or false
based on your output bind your field with it for example
on your input fields you have enable property assign your condition and you can disable it, You can also disable the button same way, however user can also inspect and change it from developers tool,
So you can use IF conditions and display the result in text instead of input fields and hide the buttons.
Hope you understand
Thanks