Skip to content

Permissions and Roles

A guide to using roles & granular permissions available in version v1.4.0 and newer.

WARNING

This guide uses the terms "Vendors" and "Stores" interchangably. In this context, they mean the same thing.

They both refer to the currently enabled store in the dashboard and applies to you only if you have "Allow normal users to create shops" setting on.

Overview

Roles are a new system introduced to improve the permission granularity and control over your page. Using roles, you can differentiate the permissions level for each user - for example, give a specific person permissions to exclusively view other people's products - without outright granting them full Admin permissions.

Roles can have multiple permission flags enabled, allowing to selectively choose which actions a user is able to perform.

Permission flags naming convention

The permission "keys" are defined in the following convention:

html
resource.action.<optional-scope>

For example, in a case where the resource in question is Products, the action is Viewing (Listing) Products and the scope is self (which means the user can only view their own products - products within their own store), the permission key looks like:

html
products.view.self

Scope naming convention

  • Any permissions (permissions ending with .any) imply administrative overrides to viewing, editing and deleting resources. Users with this permission will ignore vendor-specific filtering.
  • Self permissions (permission ending with .self) imply only resources within the user's store unit are available.

Wildcard Permission

The wildcard permission * overrides all other permissions and gives the user total control over the page.

Adding any other permission along with the * wildcard permission is not necessary and will be ignored.

TIP

Giving someone a role with the * wildcard is the same behavior to how the admin status toggle worked prior to v1.4.0.

Permission Presets

There are two permission presets available at the moment:

  1. Admin preset - allows * wildcard
  2. User preset - allows permissions marked as "Most Commonly Applicable For" -> "Regular User" in the reference table

They can be loaded at any point from the role editing page (Roles -> [Role Name]).

Assigning roles via CLI

If you've locked yourself out, or after upgrading to 1.4.0 and not automatically receiving the role, you can use the Artisan command to assign a role via the CLI:

bash
php artisan app:assign-role --user=admin@admin.com --role=Admin

Replace the email with your own, and optionally, the role name too.

TIP

In an interactive CLI, you may also omit the flag options to use a search prompt, simply run: php artisan app:assign-role.

If you're using Docker, you can run this command via:

bash
docker compose exec -it app php artisan app:assign-role --user=admin@admin.com --role=Admin

Permissions Reference Table

Permission keyDescriptionMost Commonly Applicable For
*Allows all actions (wildcard).Admin
categories.viewView categories.
categories.createCreate categories.
categories.editEdit categories.
categories.deleteDelete categories.
products.view.anyView products in any store.
products.view.selfView products in the currently selected store.Regular user
products.createCreate products.Regular user
products.edit.anyEdit products in any store.
products.edit.selfEdit products in the currently selected store.Regular user
products.delete.anyDelete products in any store.
products.delete.selfDelete products in the currently selected store.Regular user
products.featureFeature products.
products.manage-visibilityManage product visibility.
coupons.view.anyView coupon codes in any store.
coupons.view.selfView coupon codes in the currently selected store.Regular user
coupons.createCreate coupon codes.Regular user
coupons.edit.anyEdit coupon codes in any store.
coupons.edit.selfEdit coupon codes in the currently selected store.Regular user
coupons.delete.anyDelete coupon codes in any store.
coupons.delete.selfDelete coupon codes in the currently selected store.Regular user
licenses.view.anyView licenses in any store.
licenses.view.selfView licenses in the currently selected store.Regular user
licenses.createCreate licenses.Regular user
licenses.edit.anyEdit licenses in any store.
licenses.edit.selfEdit licenses in the currently selected store.Regular user
licenses.delete.anyDelete any license.
transactions.view.anyView transactions in any store.
transactions.view.selfView transactions in the currently selected store.Regular user
transactions.edit.anyEdit transactions in any store.
transactions.edit.selfEdit transactions in the currently selected store.Regular user
transactions.delete.anyDelete transactions in any store.
orders.viewView orders.
orders.editEdit orders.
orders.deleteDelete orders.
reviews.view.anyView reviews in any store.
reviews.view.selfView reviews in the currently selected store.Regular user
reviews.edit.anyEdit reviews in any store.
reviews.edit.selfEdit reviews in the currently selected store.Regular user
reviews.delete.anyDelete reviews in any store.
approval-queue.viewView approval queue.
approval-queue.approveApprove items in queue.
vendors.viewView vendors.
vendors.editEdit vendors.
vendors.create-storesCreate stores.Regular user
vendors.bypass-approvalBypass vendor approval.
users.viewView users.
users.editEdit users.
users.banBan users.
landing-reviews.editEdit landing page reviews.
gateways.viewView payment gateways.
gateways.editEdit payment gateways.
roles.viewView roles.
roles.editEdit roles.
currencies.viewView currencies.
currencies.editEdit currencies.
settings.viewView settings.
settings.editEdit settings.
settings.exportExport settings.
logs.viewView logs.
logs.purgePurge logs.
info.viewView system info.

Creating and associating roles

Non-representative screenshots

Note that these screenshots display a provisional version of the permissions system (v1.4.0-beta) and might not represent the current state of the permissions list and features. Please refer to the reference table above for up-to-date information.

Role edit preview

Roles can be named and permissions assigned.

Once a role is created, it can be associated to a given user, via the Users tab:

Role assign preview