---
title: Interactions between environment and flag rules with granular permissions
slug: feature-experimentation/docs/interactions-between-environment-and-flag-rules-with-granular-permissions
docTags: 
createdAt: 2026-08-05T20:40:03.000Z
---

- Optimizely Feature Experimentation

Before you manage [environment roles](docId\:a8Lou8ccOZnqTR863LJGo) and [flag roles](docId\:F8tdFPnxECabBXsQkBqDt), it is important to understand how flags and environments interact in a Feature Experimentation project.

Each [flag rule](docId\:zfzSgUawnKhGc59SYlTbL) operates within a specific [environment](docId\:YpSOMYlWkUccLCL-uB-ZE), and the collection of a flag’s rules in an environment is called a [ruleset](docId:-yq2-thNRv7-SgwCXpG90). When applying granular permissions, the lower of the two roles (flag or environment) determines what actions a collaborator can perform within a ruleset.

When a collaborator creates a flag, they are automatically assigned the **Admin** role for that flag.

:::hint{type="info"}
**Note**

To create a flag or audience, a collaborator must have **Editor** or above access in at least one environment.

If your project does not use granular permissions, the collaborator must have an **Editor** or above project role.
:::

![11eaf89-Blank\_diagram-2.png](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/aNMP0zOvjIFu2KQHZ5Ngf-20260720-145752.png)

The following diagram shows example flag and environment role combinations, along with the resulting ruleset permissions where each flag and environment intersect: 

![8e5dac2-image.jpeg](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/k8rZ_CrPy0U5RMqDxU9jW-20260720-145752.jpg)

:::hint{type="info"}
**Note**

The maximum permission in a ruleset is **Publisher**. An entity **Admin** can manage permissions for that entity, but is still considered at most a **Publisher** within a ruleset.
:::

The following permission matrix outlines how combinations of environment and flag roles influence what actions you can take within a ruleset.

| **Environment role** | **Flag role** | **Effective permission in ruleset**                                |
| -------------------- | ------------- | ------------------------------------------------------------------ |
| Admin                | Admin         | **Publisher** – Can publish and edit rules and manage permissions. |
| Admin                | Editor        | **Editor** – Can edit but not publish rules.                       |
| Admin                | Viewer        | **Viewer** – Can view rules only.                                  |
| Publisher            | Admin         | **Publisher**                                                      |
| Publisher            | Editor        | **Editor**                                                         |
| Publisher            | Viewer        | **Viewer**                                                         |
| Editor               | Admin         | **Editor**                                                         |
| Editor               | Editor        | **Editor**                                                         |
| Editor               | Viewer        | **Viewer**                                                         |
| Viewer               | Admin         | **Viewer**                                                         |
| Viewer               | Editor        | **Viewer**                                                         |
| Viewer               | Viewer        | **Viewer**                                                         |
