Member roles and permissions

Imagine you run the online clothing store "Cozy Closet". You want customers who signed up on the site to write product reviews themselves. Customers should be able to edit the reviews they wrote, but not touch reviews other customers wrote. A member role (ServiceUserRole) is the set of permissions that decides this: what signed-up members (ServiceUser) can read and write.

You create a member role once and apply it to many members. You create it separately from the roles (SpaceRole) you give the staff who add products and manage the site. A role created on one side can't be given on the other. Because a member role covers only what members do on the site, it also has fewer actions to choose from than a staff role (Member roles are created separately from staff roles).

The key is "only what you created"

On the screen for creating a member role, you add one group for each action you want to allow, and use the group's Allow conditions to decide what that action can be done on. On the Content tab, an allow condition has a Content Type field (which template it was made from) and an creator field (who made it). Unlike staff roles, there's no Tag field (Member roles don't use Tag conditions).

If you select The requesting user in the creator field, each member can do that action only on what they created, even when many members have the same role. "Only what you created" isn't applied automatically. If the creator field of the Edit (change and save) group is Any Users, Daon, who has "Regular Member", can edit the reviews Emma wrote too. The same goes for the Delete (remove) group. That's why, in roles you give members, you set the creator field of Edit and Delete to The requesting user.

The values you can select in the creator field are in Condition fields, and points to watch out for, including the All actions group, are in "Only what you created" works only when it's in the role. Groups decide whether an action is allowed the same way they do in staff roles (How access is decided).

From creating a role to applying it to members

It takes three steps before members can read and write within a role's scope. Staff do the first two in Content Studio. After that, every time a member reads or writes a review on the site, the role applied to that member decides whether they can.

Creating the "Regular Member" role

"Regular Member" is a role that lets members read all reviews (Read), write new ones (Create), and edit only the reviews they wrote (Edit). Create a new member role in Roles below ServiceLogin under Services in the left menu, and add Read, Create, and Edit groups narrowed to "Review" on the Content tab. Of these, set the author to The requesting user only for the Edit group. A new member role starts with a group that allows a wide scope, so instead of saving it as is, keep only the actions you need (How a new member role starts out). For the on-screen steps, see Create a member role.

Applying it to members as the Default Role

A role takes effect only once it's applied to members. The most common way is to set "Regular Member" as the Default Role of ServiceLogin (the login settings that let customers sign up themselves). When you turn on ServiceLogin, the member role you'll select as the Default Role must already exist. So if you're starting out, create the role first and then turn on ServiceLogin (You need five things to turn it on). The Default Role applies not only to newly signed-up members but to every member without a separately assigned role (One role applies to each member). The steps for selecting "Regular Member" when you first turn on ServiceLogin are in Fill in the settings form, and the steps for changing the Default Role of a ServiceLogin that's already on are in Change the Default Role.

Members read and write within their role

Daon, who has "Regular Member", can read reviews and write new ones on the site, but can edit only the reviews Daon wrote. Say you want a member who tidies up reviews to be able to delete other members' reviews too. Create a separate role whose Delete group has the author set to Any Users, and assign it to that member only. A separately assigned role replaces the Default Role, so put the groups for reading and writing reviews in that role too. The steps for creating that role are covered in Let a member delete other members' reviews, and the steps for assigning a role to one member are covered in Giving a specific member different permissions.

What to do next

  • Create a member role: Takes you screen by screen through creating the "Regular Member" role. The same Manual page also covers the actions and conditions you can choose, which role applies to a member, and what to do when you get stuck.
  • Service member login: Covers what member login is and the path from setting the Default Role to accepting your first members.
  • API reference: Covers the technical specifications, such as request formats, that you need to create and manage member roles from a program.