Sometimes you need to control which users can see or edit which User fields
You may want to show or hide User fields for some user groups, or have fields be editable or read-only for others, even mandatory just for some user groups.
To do this, you should use the "User view" functionality:
Here is how to set it up (Example: we want the "Phone" field to be mandatory for users of the type "Agent")
- Go to General - Settings - User settings.
- See if there are any options called "User views" and "View rules". If there are, then you can continue with point 3.
- Open the "User views" page.
- Do one of these:
- Create a new view from scratch:
- Click "Add new view", and give the view a descriptive name, for example "Phone mandatory".
- Open the new view. You will see a list of fields (and user settings) available, and none currently selected. Select the fields you want to use in the view. Note: The page currently reloads each time you check/select a field - just continue to add fields after each reload.
- For the added fields, check if it is mandatory, as well as the permission (Read-only or Read/Write)
- Save the new view.
- Copy an existing user view and modify it:
Open the "View rules" page (view rules controls when you will see a given user view).
Click on "New rule" to create a new rule. These fields should be set:
- Select an existing user view and copy it using the "Copy" icon to the right in the table. This creates a new view with the old name + "_COPY".
- Open the copied view. Change its name, and also select fields you want to add/remove to/from the view. You remove fields from the view by clicking on the red "X" for that row.
- Save the view after the changes are made.
Now, the user view rule should be in effect. (Using our example, Phone should be mandatory for Agents).
- View rule - this is the Rule name. Add a descriptive name like "Phone is mandatory for Agents"
- User view - this is the view that the rule applies when it triggers. Select your new view ("Phone mandatory") here.
- Performed for: Check these boxes whether this user view should be used when creating a new User, when viewing an existing User, or both.
- View rule criteria: Here, you set the criterias that controls when the user view should be shown. Currently there is only one option (but this should be improved in the future). The rule criteria that you can use is:
- "User group of currently logged on user" - Equals - value - (selected User group(s))
- Select the user groups for which the company rule should be used for. (For example "Agents")
- Save the view rule
This way, you have more control over which users can do what regarding User fields.