Create user roles

Edit on GitHub

This document describes how to create user roles in the Back Office.

Prerequisites

Create user roles

  1. Go to Users > User Roles.
  2. On the User Roles page, click Add new Role.
  3. On the Create new Role page, enter a NAME and click Create. This opens the Edit Role page with the success message displayed.
  4. In the Rule pane, select a BUNDLE.
  5. Select a CONTROLLER.
  6. Select an ACTION.
  7. Select a PERMISSION
  8. Click Add Rule. The page refreshes with the success message displayed and the rule displayed in the Assigned Rules section.
  9. Repeat steps 3-7 until you add all the needed rules.

Reference information: Create user roles

ATTRIBUTE DESCRIPTION
NAME Unique identifier of the role. You use this name to assign roles when managing users.
BUNDLE Depending on the PERMISSION, allows or denies access to a section of the Back Office. You can check this value by going to the needed section and looking it up in the URL. For example, in https://backoffice.de.b2b-demo-shop.local/product-attribute-gui/attribute/create, product-attribute-gui is a bundle.
CONTROLLER Depending on the PERMISSION, allows or denies access to a subsection of the Back Office. You can check this value by going to the needed subsection and looking it up in the URL. For example, in https://backoffice.de.b2b-demo-shop.local/product-attribute-gui/attribute/create, attribute is a controller.
ACTION Depending on the PERMISSION, allows or denies access to making actions. You can check this value by going to the needed action and looking it up in the URL. For example, in https://backoffice.de.b2b-demo-shop.local/product-attribute-gui/attribute/create, create is an action.
PERMISSION Denies or allows access to the BUNDLE, CONTROLLER, and ACTION.

Tips and tricks

To allow or deny access for all of the bundles, controllers or actions, select * in the needed field.

Alternatively, you can look up BUNDLE, CONTROLLER, and ACTION values in the navigation.xml of the needed module.

See the example of the navigation.xml file of the AvailabilityGui module:

navigation.xml
<?xml version="1.0" encoding="UTF-8"?>
<config>
    <product>
        <pages>
            <AvailabilityGui>
                <label>Availability</label>
                <title>Availability</title>
                <bundle>availability-gui</bundle>
                <controller>index</controller>
                <action>index</action>
                <pages>
                    <product-availability>
                        <label>Product Availability</label>
                        <title>Product Availability</title>
                        <bundle>availability-gui</bundle>
                        <controller>index</controller>
                        <action>view</action>
                        <visible>0</visible>
                    </product-availability>

                    <stock-edit>
                        <label>Edit Stock</label>
                        <title>Edit Stock</title>
                        <bundle>availability-gui</bundle>
                        <controller>index</controller>
                        <action>edit</action>
                        <visible>0</visible>
                    </stock-edit>
                </pages>
            </AvailabilityGui>
        </pages>
    </product>
</config>

Next steps

Create user groups