We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Implementing form field permissions

I want to show/hide/enable/disable fields on my forms based on current user role. I will implement standard RBAC patter for managing permissions and I will have list of all my form fields in database table + information who (role) can view/edit that field.
My question is, what is best way to implement solid mechanism on frontend to achieve this without adding any logic or conditions to my views. Im thinking of some way to encapsulate each UI component (textbox, datepicker, dropdown, etc.) to add permission processing in way that it will automatically pull user role from session and then set properties for that UI component.

Any ideas how to do this? Links to useful articles about how to do this correctly are welcome.

Thank you.

1 Reply

FP Francis Paul Antony Raj Syncfusion Team May 19, 2016 02:43 PM UTC

Hi Tom, 
Thanks for contacting Syncfusion support. 
We have analyzed your query. You can achieve your requirement “Adding permission related property to UI components based on User Role in the form elements” in application level only by ensuring with current user role maintained in the session. So please apply the changes in sample level to hide/disable the fields in the form, based on the user role.  
We are trying to find other alternative solutions/other feasibilities as what you expected to achieve your requirement. We will update you once we get a solution.  
Francis Paul A 

Live Chat Icon For mobile
Up arrow icon