Give roles access to folders
Access in Dropbox Portal is decided by rules. Each rule links one WordPress user role to one Dropbox folder: users with that role see that folder (and its subfolders) in the portal, and nothing else. You manage rules in step 3 Map folders to roles of the Dropbox Documents page.
A role is the type of account a user has in WordPress, such as Administrator, Editor or Subscriber. You see and change it under Users. Shops and membership plugins often add their own roles, for example "Customer".
Add a rule
- Go to Dropbox Documents and scroll to step 3 Map folders to roles. (Connect your Dropbox account first: the folder picker needs it.)
- Click + Add rule. A new row appears with the ID new.
- In the Role column, choose the role that should see the folder.
- In the Dropbox folder column, click Browse. A window lists your Dropbox folders: click a folder to open it, use Parent folder to go back, and click Use this folder when you are inside the right one. You can also type the path by hand, for example
/Clients/Acme. - In the Label column, type the name visitors will see, for example "Project documents". If you leave it empty, the folder name is used.
- Click Save settings at the bottom of the page.
After saving, the rule gets a number in the ID column. Keep it in mind: you use it with the root attribute of the shortcode to show one specific folder on a page (see Put the portal on a page). The ID never changes, even if you delete other rules.
To delete a rule, click the × at the end of its row, confirm, then click Save settings.
With an App folder app, the paths start inside your app folder: /Clients means Apps/<app name>/Clients in your Dropbox.
How rules combine
- A user sees every folder whose rule matches one of their roles.
- The same role can appear in several rules: users with that role then see several folders, and a drop-down at the top of the portal lets them switch between them.
- Users with no matching rule see the message "No document folder is linked to your account. Contact the project manager." (you can change this text, see Appearance and behaviour settings).
- Logged-out visitors never see any folder.
Administrators
The option Administrators see every configured folder (on by default) lets administrators see all the folders of all the active rules, so you can check the portal without changing your own role. Untick it if administrators should follow the rules like everyone else.
A private folder for each client
Rules work with roles, not with single users. To give each client their own private folder, give each client their own role:
- Create one role per client, for example "Client Acme". WordPress has no screen to create roles, so use a role manager plugin (for example the free User Role Editor from wordpress.org). Base the new role on Subscriber, so it has no admin rights.
- Assign that role to the client's user account: Users, click the user, change Role, then Update User.
- In Dropbox Portal, add a rule: role "Client Acme", folder
/Clients/Acme. - Repeat for each client.
All clients can then use the same portal page: each one sees only their own folder.
The free version runs only the first rule. You can save more rules, but only the first one in the list works; the others are shown greyed out and start working as soon as you start the trial or activate a licence. A folder per client therefore needs Pro.
View only: switch off downloads for a rule (Pro)
The Downloads column has a switch for each rule. When it is off, users of that rule can browse and preview the files but cannot download them. In that case images are shown only as reduced versions and PDF previews are not offered, because a full preview would be the same as a download.
In the free version the switch is locked and downloads stay on for every rule. There is also a general Downloads switch in Appearance and behaviour that turns off downloads for everyone, in any version.
Rules with no folder
A rule with an empty folder would mean "the whole Dropbox". For safety, such rules are discarded when you save, with a message. If you really need it, tick Allow rules with no folder (account root). Do this only with an App folder app: with a Full Dropbox app a rule without a folder exposes your entire Dropbox.
Write to us and tell us which plugin, what you tried and what you see. We answer from Italy, usually within one working day.