How to create only view access  role in outsystem for the web screens

How to create only view access  role in outsystem for the web screens


How can we create roles in outsystem so that if the user is assigned to that role then they can only view that page .User should not able to edit/modify any attribute of the page. Is it possible by any configuration or custom code. Please share the input.

I've been investigating this for a while now and you have to do custom coding for this.  You could use the Check<role>Role action but if your users are organized in groups (which is preferred) you need to do queires against the Group and/or Group_User entities in the System eSpace.  Do a search for 'group member' and you'll see posts that explain this in detail.  

Remember that users can have multiple roles and be members of multiple groups which complicates this process.  Once you can determine that the user is a view only user, you need to either reroute them to a view only version of the screen or have each editable field be enclosed in an 'if' block to determine what should be shown.  If you have a lot of fields the first solution will be better.

Hope this helps,
Hi ,
Thanks for the reply .

I have a user--> That Belongs to a group ---> That Group has role called -->ViewOnlyAppData-- .That does not mean that the same user cannot edit other pages .It can.Only to certain pages it has view only role. How I will redirect to view only version of web screen . Please give anexample if you have which I can refer to !! .