When managing a Multi-User Account it can be helpful to organize the users of the account into groups. This allows you to control which documents, and which pages within documents, each person can access. To modify these settings you need to have an Administrator account.
Each user who has access to your account will be a member of one or more groups. For each document in your account you can determine which of these groups are allowed to edit it, and which can view it.
For more detailed guides on how to control access for editing, viewing, and page-based viewing, see:
- How to Control Who Can Edit Documents in Displayr
- How to Control Who Can View your Documents in Displayr
- How to Control Who Can View Pages in your Document
New accounts will start with three levels of access:
- Administrators. Members of this group can view and edit all projects and can add new users.
- Edit Projects. Members of this group can view and edit all projects.
- View Projects. Members of this group can view all projects. By default new users will be added to this group.
To create a group of users:
- Make sure your account is set up as a Multi-User Account.
- Go to your company Settings page.
- Scroll down to the Groups section. Here you will see the list of groups that your account already has in place.
- Click on + New Group. You will be taken to a new page.
- Enter a Group name.
- Tick or un-tick Explore based on whether or not you want the people in this group to be able to use Explore mode. Users with Explore mode enabled will have access to all of the data in your document, so this option is not appropriate for restricting access to parts of the data.
- Click Save.
Assigning user accounts to groups
Each user account in a multi-user account can be assigned to one or more groups.
You can determine which groups a new user will be a member of at the time you add them to your account. New user accounts are created using the + New User button on the account's Settings page. By default, the Group membership setting will be set to View Projects, but you can choose different groups from the list. You can assign a user to multiple groups by holding CTRL when making this selection.
You can change the groups that a user is assigned to at any time using the following.
- On the Settings page, scroll down to the Users section.
- Click on the name of the user you want to change.
- Change the selections in the Group membership box.
- Click Save.
Choosing which groups may access a document
Access can be determined for each document. To set the access for a document:
- Go to the Documents page for your account.
- Hover over the name of the document that you want to change, and click Settings.
- Change the selections in Authorized for view only to choose which groups may view the document but not edit it.
- Change the selections in Authorized for view and edit to choose which groups of users can edit the document (in addition to being able to view it).
- Click Save.
Restricting access to individual pages (Tab-based Access)
You can also restrict pages in your document so that only certain groups of users are able to view them. This may be appropriate when you have a large document and some results are only relevant to some of the end-users.
It is important to note that if a user is assigned to one of the default groups (Administrators, Edit Projects, or View Projects), then they can always see all of the pages in your document. As a result, any user who is to be restricted to individual pages must not be a member of any of the default groups.
To choose which user groups can view each page of the document:
- Create your document.
- Publish it for the first time using Export > Web Page.
- When publishing, choose the option A link for someone with an account in your company. If your document is already published, see below for how to modify this setting.
- Go to the document's Settings.
- Scroll down and click Set tab-based access to document.
- For each Tab (page), select the groups which should have access to that page. You can make multiple selections by holding CTRL.
- Click Save.
If your document has already been published and is publicly-available, you can restrict access by going to the Settings page for the document, and click Disable Public URL.
Enable a document to change based on the user's group membership
It is possible to set up a document so that it changes the sample and outputs that are shown based on the group membership of the user who is viewing the document. This means that you can create pages which show only data that is relevant to the person who is viewing the document. For instance, you may create a document that contains survey responses for different departments within your organization, and create a filter that always selects only those responses that relate to the department of the person who is logged in to view the document.
Your R code can then make decisions based on the groups that are shown.