> ## Documentation Index
> Fetch the complete documentation index at: https://docs.laravelshopper.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Roles & Permissions

> Configure access control with roles and permissions.

Roles and permissions allow you to control what each staff member can do in your store's administration panel. This ensures security and prevents unauthorized access to sensitive areas.

## Overview

The access control system consists of:

* **Roles** - Groups of permissions assigned to users
* **Permissions** - Individual actions a user can perform

## Accessing Roles & Permissions

1. Click on **Settings** in the sidebar
2. Navigate to the access control section

## Understanding Permissions

Permissions control access to specific actions:

<Frame>
  <img src="https://mintcdn.com/shopperlabs-ee054f5e/khtWzNt9B9rQhNq5/images/v2/permissions.png?fit=max&auto=format&n=khtWzNt9B9rQhNq5&q=85&s=8ef9496e02365bc6794faf0c638e76d1" alt="Permissions" width="2898" height="1998" data-path="images/v2/permissions.png" />
</Frame>

### Permission Categories

| Category      | Examples                            |
| ------------- | ----------------------------------- |
| **Products**  | View, create, edit, delete products |
| **Orders**    | View orders, process refunds        |
| **Customers** | View customer data, edit accounts   |
| **Settings**  | Access configuration options        |
| **Staff**     | Manage other administrators         |

### Browsing Permissions

View all available permissions in the system:

<Frame>
  <img src="https://mintcdn.com/shopperlabs-ee054f5e/khtWzNt9B9rQhNq5/images/v2/permissions.png?fit=max&auto=format&n=khtWzNt9B9rQhNq5&q=85&s=8ef9496e02365bc6794faf0c638e76d1" alt="Browse Permissions" width="2898" height="1998" data-path="images/v2/permissions.png" />
</Frame>

## Managing Roles

### Creating a Role

To create a new role:

1. Navigate to Roles
2. Click **Create role**
3. Enter a name and description
4. Select permissions
5. Click **Save**

<Frame>
  <img src="https://mintcdn.com/shopperlabs-ee054f5e/KQY6o7d4neR-LyIr/images/v2/add-role.png?fit=max&auto=format&n=KQY6o7d4neR-LyIr&q=85&s=30516132d2f7bde352210af2ee22f895" alt="Add Role" width="1958" height="1294" data-path="images/v2/add-role.png" />
</Frame>

### Role Fields

| Field           | Description                       |
| --------------- | --------------------------------- |
| **Name**        | Role name (e.g., "Store Manager") |
| **Description** | What this role is for             |
| **Permissions** | List of allowed actions           |

### Updating a Role

Modify an existing role:

<Frame caption="Update Role">
  <img src="https://mintcdn.com/shopperlabs-ee054f5e/eVX_9bJEbNf6CmDO/images/v2/update-role.png?fit=max&auto=format&n=eVX_9bJEbNf6CmDO&q=85&s=1e7c2b3209b1dc9f52868310d5bbc0b0" alt="Update Role" width="2888" height="1478" data-path="images/v2/update-role.png" />
</Frame>

Changes apply immediately to all users with that role.

## Creating Permissions

Add custom permissions for your specific needs:

<Frame caption="Add Permission Form">
  <img src="https://mintcdn.com/shopperlabs-ee054f5e/KQY6o7d4neR-LyIr/images/v2/add-permission.png?fit=max&auto=format&n=KQY6o7d4neR-LyIr&q=85&s=612bd85758d5eda21b7d7316100f5cd5" alt="Add Permission" width="1898" height="1402" data-path="images/v2/add-permission.png" />
</Frame>

## Custom Permissions

Create permissions tailored to your business:

<Frame>
  <img src="https://mintcdn.com/shopperlabs-ee054f5e/6wDmKBjBTMPmRNSb/images/v2/custom-permissions.png?fit=max&auto=format&n=6wDmKBjBTMPmRNSb&q=85&s=a561527d7cd26ac5f27cf75279219db9" alt="Custom Permissions" width="2872" height="242" data-path="images/v2/custom-permissions.png" />
</Frame>

## Common Role Examples

### Store Manager

Full operational access:

* All product permissions
* All order permissions
* All customer permissions
* Limited settings access

### Content Editor

Focus on catalog management:

* View/edit products
* View/edit categories
* View/edit collections
* No order or customer access

### Support Agent

Customer service focus:

* View orders
* View customers
* Limited edit capabilities
* No product management

### Marketing

Promotional access:

* View products
* Manage discounts
* Manage collections
* No customer data access

## Best Practices

<CardGroup cols={2}>
  <Card title="Start Restrictive" icon="lock">
    Begin with minimal permissions and add as needed.
  </Card>

  <Card title="Group Logically" icon="layer-group">
    Create roles that match actual job functions.
  </Card>

  <Card title="Review Regularly" icon="rotate">
    Audit roles periodically to ensure they're still appropriate.
  </Card>

  <Card title="Document Roles" icon="file-lines">
    Keep clear descriptions of what each role can do.
  </Card>
</CardGroup>

## Permission Hierarchy

<Tip>
  Some permissions may depend on others. For example, to edit a product, a user typically also needs permission to view products.
</Tip>

When assigning permissions, consider:

1. **View** - Can see the information
2. **Create** - Can add new items
3. **Edit** - Can modify existing items
4. **Delete** - Can remove items (most sensitive)

## Security Considerations

* **Audit trails** - Track who changed what
* **Separation of duties** - Don't give one person all permissions
* **Regular reviews** - Remove unnecessary access
* **Test roles** - Verify permissions work as expected

For developer details, see the [Roles & Permissions documentation](/v2/acl).
