Role examples
Use these sets of policy statements as a starting point for creating or updating roles in your account.Example: View-specific permissions
Expand Example: View-specific permissions
Expand Example: View-specific permissions
createFlag action within a particular view. For example, if you normally restrict flag creation to certain roles, you could update the policy statements for those roles to include a specific view.Here’s how:createFlag statement scoped to one view does not prevent a member from listing additional views in the same API call. This means that a member may be able to add a flag to a view that they do not have access to, as long as they are also adding it to a view they do have permission to add flags to. Access to the flag after it exists is still governed by your other policy statements.To learn more about views, read Views.Example: Deny bypassing approvals in critical environments
Expand Example: Deny bypassing approvals in critical environments
Expand Example: Deny bypassing approvals in critical environments
{property:value} pattern to deny actions on environments based on whether or not they are critical environments. You can mark any environment as critical when you create or update it. Production environments default to being marked as critical.To manage environments based on the critical property, you must specify the property-based selector as part of the modifiers for the environment resource. Limiting resources to "proj/*:env/*;{critical:true}" accomplishes this. To learn more, read Property-based selectors.Copy this policy and make any modifications to it to suit your needs:Example: Grant access to flag toggles, but not flag rollout or targeting rules
Expand Example: Grant access to flag toggles, but not flag rollout or targeting rules
Expand Example: Grant access to flag toggles, but not flag rollout or targeting rules
Example: Grant all actions to just one flag
Expand Example: Grant all actions to just one flag
Expand Example: Grant all actions to just one flag
flag-1.For a complete list of flag actions, read Feature flag actions.Copy this policy and make any modifications to it to suit your needs:Example: Grant all actions to just one flag while showing only one project
Expand Example: Grant all actions to just one flag while showing only one project
Expand Example: Grant all actions to just one flag while showing only one project
projectKey and flagKey referenced in this role. This means you can reuse this role for different members working on different projects and flags.Copy this policy and make any modifications to it to suit your needs:Example: Restrict actions within production environments
Expand Example: Restrict actions within production environments
Expand Example: Restrict actions within production environments
production environment:updateFlagVariationsupdateTags
production environment, but the project is specified using a role attribute. When you assign this role to a member or team, you are prompted to fill in the projectKey referenced in this role. This means you can reuse this role for different members working on different projects.Copy this policy and make any modifications to it to suit your needs:Example: Allow access to flags, metrics, and segments in one project
Expand Example: Allow access to flags, metrics, and segments in one project
Expand Example: Allow access to flags, metrics, and segments in one project
projectKey referenced in this role.Copy this policy and make any modifications to it to suit your needs:Example: Deny access to the production environment
Expand Example: Deny access to the production environment
Expand Example: Deny access to the production environment
production represents the account’s production environment in all projects. This policy denies the member from modifying any feature flags in production:notResources in a statement. notResources explicitly allows all actions to feature flags across all environments except an environment you specify.In the example below, the combination of notResources and the allow effect gives access to all environments except the production environment.Here’s how:Replace a base role with preset roles
Base roles apply to your whole account. Preset roles split that access in two: an organization role covers account-level resources, and a project role covers the resources inside the projects you name. Most members need one of each. This table shows the closest preset role equivalent for each base role:| Base role | Organization role | Project role | Role attribute |
|---|---|---|---|
| Reader | LaunchDarkly Member | LaunchDarkly Viewer | viewerProjectKeys |
| Writer | LaunchDarkly Member | LaunchDarkly Maintainer | maintainerProjectKeys |
| Admin | LaunchDarkly Organization admin and LaunchDarkly Billing admin | LaunchDarkly Project admin | adminProjectKeys |
- Preset project roles apply only to the projects you list in the role attribute. A base role applies to every project, including ones you create later.
- LaunchDarkly Member does not grant access to applications, code references, integrations, webhooks, service tokens, workflow templates, or teams, all of which the Writer base role includes. Only LaunchDarkly Organization admin and LaunchDarkly Architect grant these. If a member needs one of them, add a role of your own alongside LaunchDarkly Member rather than moving up to Architect, which also grants member and team management.
- LaunchDarkly Organization admin cannot manage billing, which means replacing the Admin base role requires two organization roles. LaunchDarkly Billing admin can also change which member has the account Owner role, which the Admin base role cannot.
- Click the gear icon in the left sidebar to open the settings page.
- Click Roles.
- Click the role name to review the access it provides.