Hi Sagar,
You can also do this with metadata. Please follow below steps to do:
1. Go to accounts tab --> configuration --> User metadata --> add new field "role"
2. Go to accounts tab --> users --> click on specific user -> select user metadata tab --> and give hardcoded role (like developer etc.).
3. Create one field into your Web Interface and initialize it with "${P_user.extended.role}"
Note: This method is hard coded. You have to define this at the time of assigning role's privileges.
Feel free to ask.
Best Regards,
Shobhit