---
url: https://plugin.stripo.email/extensions/reference/types/EditorPermissions.md
---
# EditorPermissions

Interface describing the current user's permissions in the Stripo Email Editor.

```typescript
interface EditorPermissions
```

## Description

`EditorPermissions` represents the set of feature permissions granted to the current editor user. Each permission group is an [`EditorPermissionAccess`](#editorpermissionaccess) object with optional `read` and `write` flags. Permissions are provided by your backend through the User Permissions API and can be read in extensions via [BaseApi](../api/BaseApi.md) using `getUserPermissions()` or observed with `onUserPermissionsUpdated()`.

See [Permissions and Access Management](/editor-configuration/permissions-and-access-management) for how permissions are configured on your backend.

## Import

```typescript
import type { EditorPermissions } from '@stripoinc/ui-editor-extensions';
```

## Properties

All properties are optional. A missing permission group means no restriction information is available for it.

| Property | Type | Description |
|----------|------|-------------|
| appearance | `EditorPermissionAccess` | Access to appearance settings (fonts, colors, styles) |
| codeEditor | `EditorPermissionAccess` | Access to the HTML code editor |
| content | `EditorContentPermissionAccess` | Access to template content, with optional text-only editing |
| modules | `EditorPermissionAccess` | Access to browsing and managing custom/saved modules |
| entityImages | `EditorPermissionAccess` | Access to the image gallery scoped to the current entity |
| projectImages | `EditorPermissionAccess` | Access to the image gallery scoped to the project |
| versionHistory | `EditorPermissionAccess` | Access to viewing and restoring template version history |
| manageOwnComments | `EditorPermissionAccess` | Access to viewing and managing the user's own comments |
| manageAllComments | `EditorPermissionAccess` | Access to viewing and managing comments of all users |
| replyAllComments | `EditorPermissionAccess` | Access to replying to comments of all users |
| accessibilityTesting | `EditorPermissionAccess` | Access to the Accessibility Testing Mode |
| elementsLock | `EditorPermissionAccess` | Access to locking and unlocking template elements |

## Related Types

### EditorPermissionAccess

Base access descriptor for a permission group.

```typescript
interface EditorPermissionAccess {
    read?: boolean;
    write?: boolean;
}
```

| Property | Type | Description |
|----------|------|-------------|
| read | `boolean` | Allows viewing the feature |
| write | `boolean` | Allows modifying data through the feature |

### EditorContentPermissionAccess

Access descriptor for the `content` permission group with an additional text-only flag.

```typescript
interface EditorContentPermissionAccess extends EditorPermissionAccess {
    textOnly?: boolean;
}
```

| Property | Type | Description |
|----------|------|-------------|
| textOnly | `boolean` | Allows editing only text values without changing layout or design |

## Example

```typescript
const permissions = this.api.getUserPermissions();

// Adapt extension UI to the user's access level
if (!permissions.content?.write) {
    this.disableEditingControls();
}

if (permissions.content?.textOnly) {
    this.enableTextOnlyMode();
}

// React to permission changes
this.api.onUserPermissionsUpdated((newPermissions) => {
    this.setEditingEnabled(!!newPermissions.content?.write);
});
```
