# Add a feature permission rule

> Pick a feature right from the list in the Security permission dialog (9 modules, 37 rights, each with its description and edition badge, plus the module wildcards), read why a right is disabled, read what a typed catch-all, prefix or DENY affects, and what a DENY does to the Administrator; the read-only route GET /api/auth/feature-rights.

Product: eaxScada · Type: How-to guide · Editions: Starter, Pro, Enterprise
Source: https://eaxware.com/docs/eaxscada/how-to/add-a-feature-permission-rule/
Verified against commit e69c505.

A **feature rule** gives or takes one right of a module: the shift log, Analytics and Reports, genealogy, recipes and batches, screen scripts, server files or PLC control. The permission dialog lists every such right, so you pick it rather than type its name. The list only describes the rights: what a rule does is decided by each module's own check, as before.

## Before you start

- **You must be an Administrator.** The list of rights comes from `GET /api/auth/feature-rights`, which answers security administrators only.
- Decide on whom the rule goes: a role, a group or one user.
- Read [Feature DENY rules and the Administrator](/docs/platform/explanation/security-and-part-11/#feature-deny-rules-and-the-administrator): a DENY can take a right from the Administrator too.

## 1. Open the dialog

1. Open **Security > Permissions** and add a rule. The dialog **Add permission rule** opens.
2. Choose the role, group or user the rule is for.
3. Set **Target Type** to **SCADA Feature**. The list of feature rights appears.
4. Choose the **Effect** first (ALLOW or DENY): the list then disables what an ALLOW cannot grant.

## 2. Pick the right

The list groups the rights by module. Each right shows its name, what it allows, and an edition badge (**Starter**, **Pro** or **Enterprise**) when it needs a licence. Type in **Feature right** to search by name, description or module. The line under the list counts the rights shown.

| Module | Rights | Badge | Module wildcard |
|---|---|---|---|
| Shift log | `shiftlog_view`, `shiftlog_write`, `shiftlog_sign`, `shiftlog_review`, `shiftlog_admin` | Enterprise | `shiftlog_*` (DENY only) |
| Analytics and Reports | `reports_view`, `reports_design`, `datasets_edit`, `reports_schedule`, `reports_distribute_external`, `reports_sign`, `analytics`, `reports_admin` | Pro | none |
| OEE and downtime | `production_view`, `production_reason`, `production_reason_closed`, `production_plan`, `production_counts`, `production_configure`, `production_recompute` | Pro | `production_*` (DENY only) |
| Part and lot genealogy | `genealogy.read`, `genealogy.write`, `genealogy.read_personal` | Pro on `genealogy.write` | `genealogy.*` (ALLOW and DENY) |
| Recipes and batches | `recipe.edit`, `recipe.approve`, `recipe.download`, `batch.run`, `batch.sign` | none | none |
| Screen scripts | `screens.script` | none | `screens.*` (DENY only) |
| Dashboard code | `dashboards.code` (add or change custom card HTML, CSS and JS, and custom chart scripts) | none | `dashboards.*` (DENY only) |
| Server files | `server_files.list`, `server_files.stat`, `server_files.read`, `server_files.write`, `server_files.delete`, `server_files.mkdir` | Starter | `server_files.*` (ALLOW and DENY) |
| PLC control | `plc_control` (start, stop, force I/O, deploy and roll back PLC programs) | none | none |

What each **OEE and downtime** right allows, and the rules a new installation gets: [Set up OEE and downtime](/docs/eaxscada/how-to/set-up-oee-and-downtime/#3-grant-the-rights). An installation upgraded to this release gets no rule: only the Administrator holds them until you add rules.

Picking a right, or a module's **All ... rights** line, fills **Pattern** with exactly that name. Only type a pattern yourself for an advanced rule (see step 3).

**Why a right is disabled.** A disabled line says why, in amber:

- **Not in the current licence: needs Pro** (or Starter, Enterprise): the licence does not have the module.
- **Held by role level: a rule can only refuse it (choose DENY)**: with Effect ALLOW, for the recipe and batch rights (Process_Supervisor and above hold them), `screens.script` and `dashboards.code` (Lead_Engineer and above). An ALLOW of these rights grants nothing.
- **An ALLOW of ... grants nothing: grant the rights one by one, or choose DENY**: with Effect ALLOW, for the wildcards `shiftlog_*`, `screens.*`, `dashboards.*` and `production_*`.

A right the AI co-pilot never holds says so in its tooltip.

If the list cannot be read, the dialog says "The feature rights could not be read (...): type the pattern below", and you can still type the right's name.

## 3. Read what a typed pattern affects

When you type a pattern, the dialog says under it what the rule will match. A rose note is a rule that reaches further than one module, or the Administrator:

| You type | The dialog says |
|---|---|
| `*` or `feature:*` | It is a catch-all and affects every module. As DENY it refuses the feature rights of every module, the Administrator's included. As ALLOW it grants no feature right. |
| A prefix ending in `*` (`reports*`, `plc*`) | Which rights it matches, in which modules (rose when it spans more than one). As ALLOW, a prefix that is not a granting wildcard grants nothing. |
| A name that is not in the list | The rule matches no listed feature right (check the spelling). |
| A right held by role level, as ALLOW | The ALLOW grants nothing: a rule can only refuse it. |
| Any DENY | A DENY applies to the Administrator too. |

## 4. Save, and check

Set **Evaluation Priority** and save. A DENY wins over every ALLOW, whatever the priority. To check the effect, sign in as a person the rule covers, or use [Find where a tag, screen or alarm is used](/docs/eaxscada/how-to/find-where-used/) to see what they can reach.

## What a DENY and an ALLOW do per module

- **A matching DENY refuses the right to everyone**, the Administrator and the engineer roles included: the right itself, its module wildcard, `*`, `feature:*` or a prefix ending in `*`, each with or without `feature:`. This now holds for **PLC control** (a DENY on target type *SCADA Feature* or *REST API*) and for every **server file** operation too.
- **An ALLOW grants only what it names**: the right itself, or `genealogy.*` and `server_files.*` for their modules. A catch-all or prefix ALLOW grants no feature right, `plc_control` included: grant PLC control with an ALLOW of exactly `plc_control` (action execute, write or admin).
- **Without a rule** the role level decides: PLC control is held by Lead_Engineer and Administrator (level 80 and above), the server file operations as listed in [Server files](/docs/eaxscada/reference/server-files/#checks-on-every-call).
- **When the rules cannot be read**, every feature right is refused to everyone, PLC control included.
- **Security administration is never affected.** The Administrator keeps the Security workspace whatever feature rule exists, so a DENY that went too far can always be removed.

## Over the HTTP API

`GET /api/auth/feature-rights` (also `HEAD`) returns the list the dialog shows. Administrators only; another account gets `403`. It is never served through an eaxCloud remote session (`403 remote_never`). The answer is not cached (`Cache-Control: no-store`). It is read only: it decides nothing.

```json
{
  "families": [
    {"id": "server_files", "label": "Server files", "wildcard": "server_files.*", "wildcard_allow_grants": true},
    {"id": "plc", "label": "PLC control"}
  ],
  "rights": [
    {"name": "plc_control", "family": "plc",
     "description": "Start, stop, force I/O, deploy and roll back PLC programs (Lead_Engineer and above)",
     "allow_grants": true, "deny_covers_admin": true, "catch_all_deny": true, "catch_all_allow": false, "ai_copilot": true}
  ]
}
```

| Field | Meaning |
|---|---|
| `families[].wildcard` | The pattern that matches every right of the module and nothing else; absent when the module has none. |
| `families[].wildcard_allow_grants` | An ALLOW of the wildcard grants the module's rights; otherwise the wildcard is a DENY only. |
| `rights[].edition_feature`, `edition_required` | The licence feature the right needs and the lowest edition that has it (the badge); absent when every edition has it. |
| `rights[].paid_only` | The right needs a paid licence (server files: Free has no server file root). |
| `rights[].allow_grants` | An ALLOW naming the right grants it. `false` for rights held by role level only. |
| `rights[].deny_covers_admin` | A DENY naming the right refuses the Administrator too. |
| `rights[].catch_all_deny`, `catch_all_allow` | A DENY `*` refuses it; an ALLOW `*` grants it (never). |
| `rights[].ai_copilot` | The AI co-pilot may hold it. `true` for PLC control means only that this check does not refuse it: the MCP gateway refuses the AI co-pilot PLC control on its own. |

## Related

- [Security and 21 CFR Part 11: role-based access control](/docs/platform/explanation/security-and-part-11/#5-role-based-access-control-rbac)
- [Grant report rights](/docs/eaxscada/how-to/grant-report-rights/), [Set up shift logs](/docs/eaxscada/how-to/set-up-shift-logs/#2-grant-the-rights), [Grant the screen script right](/docs/eaxscada/how-to/grant-the-screen-script-right/)
- [HTTP API reference](/docs/eaxscada/reference/generated/http-api/)
