Examples to Create Custom Roles

Since you can create roles with various permissions, we have listed down examples of some common scenarios.

Entry-level Permissions

Scenario 1:

Create a role that has all permissions to all entries of specific content types.

Example:

All permissions to the “Products” content type

To do this, log in to your Contentstack account and perform the following steps:

  1. Click on the Organization dropdown on the header and select the organization where you want to make the changes.
  2. Select the Stack where you want to provide the permissions.
  3. Hover over the “Settings” gear icon and click on Roles.
  4. Click + New Role and add relevant Name and Description.
  5. Under Entries in the Permissions section, go to All Entries of Content Types and click + Add rule.
  6. Select All Permissions in the Select Permissions field.
  7. In the next field, click and select Specific Content Types.
  8. Click the Select Content Types button that appears, and select the content types (e.g., Products) to which you want to assign the permissions.Example - Entry-level permissions - Scenario 1.png
  9. Then, click Add Content Types. Save the role.

Tutorial Video

Let's create a role that has all permissions to all entries of specific content types.

entry_level_permission_scenario_1.png

Scenario 2:

Create a role that has specific permissions to all entries of specific content types.

Example:

READ permission to the “Products” content type

To do this, log in to your Contentstack account, and perform the following steps:

  1. Click on the Organization dropdown on the header and select the organization where you want to make the changes.
  2. Select the Stack where you want to provide the Read permission.
  3. Hover over the “Settings” gear icon and click on Roles.
  4. Click + New Role and add relevant Name and Description.
  5. Under Entries in the Permissions section, go to All Entries of Content Types and click + Add rule.
  6. Select the READ permission in the Select Permissions field.
  7. In the next field, click and select Specific Content Types.
  8. Click the Select Content Types button that appears and select the content types (e.g., Products) to which you want to assign the permissionsExample - Entry-level permissions - Scenario 2.png
  9. Click Add Content Types. Save the role.

Tutorial Video

Let's create a role that has all permissions to all entries of all content types. But the role CANNOT read a specific entry of a content type.

entry_level_permission_scenario_2.png

Scenario 3:

Create a role that has all permissions to all entries of all content types. But the role CANNOT read a specific entry of a content type.

Example:

CANNOT READ the “Introducing iPhone X” entry of the Products content type.

To do this, log in to your Contentstack account, and perform the following steps:

  1. Click on the Organization dropdown on the header and select the organization where you want to make the changes.
  2. Select the Stack where you want to provide the permissions.
  3. Hover over the “Settings” gear icon and click on Roles.
  4. Click + New Role and add relevant Name and Description.
  5. Under Entries in the Permissions section, go to All Entries of Content Types and click + Add rule.
  6. Select All Permissions in the Select Permissions field.
  7. In the next field, select All Content Types.
  8. Scroll down and click the + Add exceptions link.
  9. Under Specific Entries, click + Add rule.
  10. Under Permissions, select Read (you will see that All Permissions will be selected by default). Then, click Select Content Type, and select a content type (e.g., Products). And finally, select the entry to which you want to restrict read access (e.g., Introducing iPhone X).
  11. Click Add Entries. Save the role.

Tutorial Video

Let's create a role that has all permissions to all entries of all content types. But the role CANNOT read a specific entry of a content type.

entry_level_permission_scenario_3.png

Field-level permissions

Scenario 4:

Create a role that has all permissions to all entries of all content types. But the role CANNOT edit a specific field of a content type.

Example:

CANNOT EDIT the Description field of the Products content type.

  1. Click on the Organization dropdown on the header and select the organization where you want to make the changes..
  2. Select the relevant Stack.
  3. Click on the Settings dropdown menu and select Roles.
  4. Click + New Role and add relevant Name and Description.
  5. Under Entries in the Permissions section, go to All Entries of Content Types and click + Add rule.
  6. Select All Permissions in the Select Permissions field.
  7. In the next field, select All Content Types.
  8. Scroll down and click the + Add exceptions link. Under Specific Fields, click + Add rule.
  9. Under Permissions, select Edit. Then, click Select Content Type, and select a content type (e.g., Products). And finally, select the field to which you want to restrict edit access (e.g., Description).
  10. Click Add Entries. Save the role.

Tutorial Video

Let's create a role that has all permissions to all entries of all content types. But the role CANNOT edit a specific field of a content type.

field_level_permission_scenario_4.png

Asset-level permissions

Scenario 5:

Create a role that has specific permissions on specific assets.

Example:

READ only ‘Image 1’ and ‘Image 2’.

  1. Click on the Organization dropdown on the header and select the organization where you want to make the changes.
  2. Select the relevant Stack.
  3. Click on the Settings dropdown menu and select Roles.
  4. Click + New Role and add relevant Name and Description.
  5. Under Assets in the Permissions section, click + Add rule.
  6. Select the required permissions (e.g., Read) in the Select Permissions field.
  7. In the next field, select Specific Assets. Then, click the Select Assets button that appears. You can then select the assets (e.g., Image 1 and Image 2) to which you want to assign the selected permissions.
  8. Save the role.

Tutorial Video

Let's create a role that has specific permissions on specific assets.

asset_level_permission_scenario_5.png

Api Reference

Here are some relevant API requests that you can use when working with our Content Management APIs:

Create role

Update role

Delete role

On This Page

top-arrow