You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -26,30 +26,48 @@ left and open the **Users and Permissions** tab.
26
26
27
27
## Core concepts
28
28
29
-
The diagram below shows an overview of how permissions are assigned within your Flagsmith organisation:
29
+
### How permissions are assigned
30
30
31
-
<divstyle={{textAlign:'center'}}>
32
-
```mermaid
33
-
graph LR;
34
-
R[Custom roles] -->|Assigned to| G[Groups];
35
-
B[Built-in roles] -->|Assigned to| U[Users];
36
-
R -->|Assigned to| U;
37
-
R -->|Assigned to| A[Admin API keys];
38
-
G -->|Contains many| U;
39
-
```
31
+
Permissions are granted to **[roles](#roles)**, and roles are assigned to users, [groups](#groups), or [Admin API keys](/integrating-with-flagsmith/flagsmith-api-overview/admin-api/authentication). A user's effective permissions are the **union of all permissions** from every role assigned to them — both directly and through group membership.
40
32
41
-
</div>
33
+

34
+
35
+
### Permission levels
36
+
37
+
Permissions in Flagsmith are managed at three levels that align with the data hierarchy. Understanding which permissions apply at which level is critical for setting up access control correctly.
A role is a set of permissions that, when assigned, allows performing specific actions on your organisation, projects or
46
44
project environments.
47
45
48
-
**Built-in roles** are predefined by Flagsmith and cannot be modified. All users in your organisation have one of the
49
-
following built-in roles:
46
+
#### Organisation-level roles
47
+
48
+
Every user in your organisation has exactly one of these built-in organisation roles:
49
+
50
+
-_Organisation Administrator_ — full access to everything in your Flagsmith organisation
51
+
-_User_ — no default access; requires permissions via custom roles, groups, or project/environment admin assignments
52
+
53
+
A user with the _User_ organisation role can still have significant access — for example, they could be an administrator of specific projects or environments while having no access to others.
54
+
55
+
#### Project and environment administrators
56
+
57
+
In addition to organisation-level roles, Flagsmith has built-in administrator permissions at the project and environment levels:
58
+
59
+
-_Project Administrator_ — full access to a specific project and all its environments
60
+
-_Environment Administrator_ — full access to a specific environment only
61
+
62
+
These are assigned per-resource, not globally. For example, a user could be:
50
63
51
-
-_Organisation Administrator_ grants full access to everything in your Flagsmith organisation.
52
-
-_User_ grants no access and requires you to assign permissions using custom roles and/or groups.
64
+
- An _Organisation User_ (no organisation-wide admin access)
65
+
- A _Project Administrator_ for _Mobile App_ (full control of that project and all of its environments)
66
+
- An _Environment Administrator_ for _Development_ in _Web App_ (full control of just that environment)
67
+
68
+
This granular approach allows you to give users administrative control exactly where they need it, without granting organisation-wide access.
69
+
70
+
#### Custom roles
53
71
54
72
**Custom roles** can be assigned to users, groups or [Admin API](/integrating-with-flagsmith/flagsmith-api-overview/admin-api) keys. Any
55
73
number of custom roles can be created and assigned.
@@ -93,7 +111,7 @@ permissions they need as soon as they log in for the first time.
93
111
When a user accepts their email invitation, they will be prompted to sign up for a Flagsmith account, or they can choose
94
112
to log in if they already have an account with the same email address.
95
113
96
-
Users who have not yet accepted their invitations are listed in the "Pending invites" section at the bottom of this
114
+
Users who have not yet accepted their invitations are listed in the _Pending invites_ section at the bottom of this
97
115
page. From here you can also resend or revoke any pending invitations.
98
116
99
117
### Invitation links
@@ -120,28 +138,16 @@ options:
120
138
-[Use existing groups from your enterprise identity provider](/administration-and-security/access-control/saml#using-groups-from-your-saml-idp).
121
139
Any time a user logs in using single sign-on, they will be made a member of any groups with matching external IDs.
122
140
123
-
## Deprecated features
124
-
125
-
Groups can grant permissions directly to their members in the same way that roles do. This functionality was deprecated
126
-
in Flagsmith 2.137.0. To grant permissions to all members of a group, create a role with the desired permissions and
127
-
assign it to the group instead.
141
+
## Tagged permissions
128
142
129
-
Assigning roles to groups has several benefits over assigning permissions directly to a group:
143
+
Some permissions can be restricted to features with specific tags. For example, you can configure a role to create change requests only for features tagged with _marketing_.
130
144
131
-
- Roles can be assigned to Admin API keys, but Admin API keys cannot belong to groups.
132
-
- If you need multiple groups or users with similar permissions, the common permissions can be defined in a role and
133
-
assigned to multiple groups or users instead of being duplicated.
134
-
- Having roles as the single place where permissions are defined makes auditing permissions easier.
145
+
The _Supports Tags_ column in the tables below indicates which permissions support tag-based restrictions. See [Tags](/managing-flags/tagging) for how to create and manage tags.
135
146
136
147
## Permissions reference
137
148
138
149
Permissions can be assigned at four levels: user group, organisation, project, and environment.
139
150
140
-
## Tagged Permissions
141
-
142
-
When creating a role, some permissions allow you to grant access when features have specific tags. For example, you can
143
-
configure a role to create change requests only for features tagged with "marketing".
144
-
145
151
### User group
146
152
147
153
| Permission | Ability |
@@ -157,8 +163,6 @@ configure a role to create change requests only for features tagged with "market
| Administrator | Grants full read and write access to all environments, features, and segments. ||
@@ -181,3 +185,117 @@ configure a role to create change requests only for features tagged with "market
181
185
| Create change request | Allows creating change requests for features in this environment. | Yes |
182
186
| Approve change request | Allows approving or denying change requests in this environment. | Yes |
183
187
| View identities | Grants read-only access to identities in this environment. ||
188
+
189
+
### Permission levels explained
190
+
191
+
Some permissions are **project-level** and cannot be restricted to specific environments. This follows directly from the [Flagsmith data model](/flagsmith-concepts/data-model): features and segments are defined at the project level and shared across all environments.
192
+
193
+
-**Create feature** — New features appear in all environments simultaneously
194
+
-**Delete feature** — Removing a feature removes it from all environments simultaneously
195
+
-**Manage segments** — Segments are project-wide and affect all environments
196
+
197
+
To control **flag values** per environment, use environment-level permissions like _Update feature state_ and _Manage segment overrides_.
198
+
199
+
## Common permission setups
200
+
201
+
The following scenarios illustrate how to configure permissions for typical team structures. These examples help clarify which permissions to set at the project level versus the environment level.
202
+
203
+
:::note
204
+
205
+
These examples assume users have the built-in _User_ role at the organisation level (not _Organisation Administrator_). Organisation Administrators have full access to everything, so granular permissions only apply to users with the _User_ role.
206
+
207
+
:::
208
+
209
+
### Developer with Production restrictions
210
+
211
+
**Goal**: Alice (developer) can create features and work freely in Development and Staging, but cannot modify Production directly — she must submit change requests instead.
212
+
213
+
**Setup**:
214
+
215
+
1. Create a _Developers_ group and add Alice to it
216
+
2. Create a custom role called _Developer Access_ with these permissions:
3. Assign the _Developer Access_ role to the _Developers_ group
222
+
223
+
**Result**: Alice can create features (which appear in all environments), toggle them freely in Development and Staging, but must submit change requests to modify anything in Production.
224
+
225
+
### QA team with read-only Production access
226
+
227
+
**Goal**: The QA team can view Production flag states and identities for verification, but cannot change anything.
228
+
229
+
**Setup**:
230
+
231
+
1. Create a _QA Team_ group and add QA team members to it
232
+
2. Create a custom role called _Production Viewer_ with these permissions:
3. Assign the _Production Viewer_ role to the _QA Team_ group
236
+
237
+
**Result**: QA team members can see the Production environment and inspect identities, but cannot modify flag states or create change requests. The _Production Viewer_ role can also be assigned to other groups (e.g., _Auditors_) that need the same access.
238
+
239
+
:::note Why QA cannot have environment-specific segment access
240
+
241
+
You might want QA to view segments in Production only. However, _Manage segments_ is a **project-level permission** — granting it would give QA segment control across all environments. Segments are defined once per project and shared across all environments.
242
+
243
+
:::
244
+
245
+
### Restricting feature deletion
246
+
247
+
**Goal**: Prevent most developers from accidentally deleting features while allowing team leads to do so when necessary.
248
+
249
+
**Understanding**: _Delete feature_ is a **project-level permission**. Deleting a feature removes it from **all environments simultaneously** — there is no way to delete a feature from just one environment.
250
+
251
+
**Setup**:
252
+
253
+
1. Create a custom role called _Feature Creator_ with:
3. Assign the _Feature Creator_ role to the _Developers_ group (or other groups that need to create features)
260
+
4. Assign the _Feature Manager_ role to team leads or a _Team Leads_ group
261
+
262
+
**Result**: Most developers can create and modify features, but only those with the _Feature Manager_ role can delete them. Multiple groups can share the same role.
263
+
264
+
### Team lead with full project control
265
+
266
+
**Goal**: A team lead needs complete control over their project, including all environments, but should not affect other projects in the organisation.
267
+
268
+
**Setup**:
269
+
270
+
1. Create a custom role called _Project Admin_ with:
271
+
-**Project-level**: Administrator
272
+
2. Assign the _Project Admin_ role to the team lead user (or to a _Team Leads_ group)
273
+
274
+
**Result**: The team lead has full access to all environments, features, and segments within that project. They can manage permissions for other users on that project. They cannot access other projects unless explicitly granted. The same _Project Admin_ role can be reused across different projects for different team leads.
275
+
276
+
### External contractor with limited access
277
+
278
+
**Goal**: An external contractor needs to work on a specific feature in Development only, with no access to Production data.
279
+
280
+
**Setup**:
281
+
282
+
1. Create a custom role called _Dev Environment Editor_ with:
283
+
-**Project-level**: View project
284
+
-**Development environment**: View environment, Update feature state
285
+
2. Assign the _Dev Environment Editor_ role to the contractor user (or to a _Contractors_ group if you have multiple)
286
+
3. Optionally, use [tagged permissions](#tagged-permissions) to restrict their access to only features with a specific tag (e.g., _contractor-feature_)
287
+
288
+
**Result**: The contractor can see the project structure and modify flag states in Development only. They cannot see or affect Staging, Production, or any identities. This role could also be useful for interns or other users who should only work in Development.
289
+
290
+
## Deprecated features
291
+
292
+
Groups can grant permissions directly to their members in the same way that roles do. This functionality was deprecated
293
+
in Flagsmith 2.137.0. To grant permissions to all members of a group, create a role with the desired permissions and
294
+
assign it to the group instead.
295
+
296
+
Assigning roles to groups has several benefits over assigning permissions directly to a group:
297
+
298
+
- Roles can be assigned to Admin API keys, but Admin API keys cannot belong to groups.
299
+
- If you need multiple groups or users with similar permissions, the common permissions can be defined in a role and
300
+
assigned to multiple groups or users instead of being duplicated.
301
+
- Having roles as the single place where permissions are defined makes auditing permissions easier.
Copy file name to clipboardExpand all lines: docs/docs/administration-and-security/governance-and-compliance/change-requests.md
+11-14Lines changed: 11 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,12 +24,6 @@ Change Requests are configured at the environment level. To enable and set up Ch
24
24
25
25
Once an environment is configured with Change Requests enabled, attempting to change a flag value will prompt you to create a new Change Request.
26
26
27
-
:::info
28
-
29
-
Any user with permission to *update* a feature within the environment can create a Change Request.
30
-
31
-
:::
32
-
33
27
When creating a Change Request, you will need to provide the following:
34
28
35
29
* The **title** of the Change Request.
@@ -40,17 +34,20 @@ When creating a Change Request, you will need to provide the following:
40
34
41
35
Change Requests awaiting approval are listed in the **Change Request** area.
42
36
43
-
:::info
44
-
45
-
Any user with permission to write to the environment containing the Change Request can approve it.
46
-
47
-
:::
48
-
49
37
1. Click on a **Change Request** to view its details.
50
38
2. Review the current and new Flag values.
39
+
3. Click **Approve** or **Deny** to record your decision.
51
40
52
41
## Publish a Change Request
53
42
54
-
When the required number of approvals have been made, you will be able to publish the Change Request.
43
+
When the required number of approvals have been made, you will be able to publish the Change Request. The Change Request will immediately come into effect once the **Publish Change** button is clicked.
| Create a Change Request | Create change request |
50
+
| Approve a Change Request| Approve change request |
51
+
| Publish a Change Request| Update feature state |
55
52
56
-
The Change Request will immediately come into effect once the **Publish Change** button is clicked.
53
+
These permissions can be configured at both the project level and the environment level. For example, you might allow all developers to create change requests in Production, but only senior engineers to approve and publish them. See [Role-based access control](/administration-and-security/access-control/rbac) for details on configuring permissions.
Copy file name to clipboardExpand all lines: docs/docs/flagsmith-concepts/data-model.md
+29Lines changed: 29 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,3 +52,32 @@ For more information, see [Traits](/flagsmith-concepts/identities#identity-trait
52
52
Segments define a group of users by traits such as login count, device, location, or any number of custom-defined traits. Similar to individual users, you can override environment defaults for features for a segment. For example, you might show certain features for a "power user" segment.
53
53
54
54
For more information, see [Segments](/flagsmith-concepts/segments).
55
+
56
+
## Permissions and the data model
57
+
58
+
Permissions in Flagsmith are managed at three levels that align with the data hierarchy:
59
+
60
+
-**Organisation**: User management, project creation
61
+
-**Project**: Feature and segment creation/deletion, environment creation
62
+
-**Environment**: Flag state changes, identity management, change requests
63
+
64
+
Understanding which level controls what is important when setting up access control:
65
+
66
+
| Resource | Defined at | Values controlled at | Implication for permissions |
0 commit comments