Skip to content

feat: choose environment administrators on environment creation#7610

Open
kyle-ssg wants to merge 2 commits into
feat/project-admin-selectorfrom
feat/environment-admin-selector
Open

feat: choose environment administrators on environment creation#7610
kyle-ssg wants to merge 2 commits into
feat/project-admin-selectorfrom
feat/environment-admin-selector

Conversation

@kyle-ssg
Copy link
Copy Markdown
Member

@kyle-ssg kyle-ssg commented May 27, 2026

Thanks for submitting a PR! Please check the boxes below:

  • I have read the Contributing Guide.
  • I have added information to docs/ if required so people know about the feature.
  • I have filled in the "Changes" section below.
  • I have filled in the "How did you test this code" section below.

Changes

image

Lets the creator assign other users and roles as environment administrators directly from the Create Environment page, rather than having to open Environment Settings → Permissions afterwards. Selections are applied on save; a partial-failure toast points to Environment Settings → Permissions for retry.

How did you test this code?

  • Created an environment with a non-admin user and a custom role selected; confirmed both appear with admin permission under Environment Settings → Permissions.

…ment creation

Lets the creator assign other users and roles as environment administrators
directly from the Create Environment page. Adds dedicated RTK endpoints for
environment user and role permissions, and assigns selections on save with a
partial-failure toast.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@kyle-ssg kyle-ssg requested a review from a team as a code owner May 27, 2026 09:52
@kyle-ssg kyle-ssg requested review from talissoncosta and removed request for a team May 27, 2026 09:52
@vercel
Copy link
Copy Markdown

vercel Bot commented May 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
flagsmith-frontend-preview Ready Ready Preview, Comment May 27, 2026 11:37am
flagsmith-frontend-staging Ready Ready Preview, Comment May 27, 2026 11:37am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Ignored Ignored Preview May 27, 2026 11:37am

Request Review

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 27, 2026

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-api-test:pr-7610 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-e2e:pr-7610 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith:pr-7610 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-api:pr-7610 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-private-cloud:pr-7610 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-frontend:pr-7610 Finished ✅ Results

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the ability to assign environment administrators (both users and roles) during the creation of a new environment. It adds the necessary API endpoints, hooks, request types, and UI components to support this feature. A critical bug was identified in CreateEnvironmentPage.tsx where a stale closure on organisationId inside assignEnvironmentAdmins could cause API requests to fail if the organization ID resolves after the component mounts. It is recommended to read the latest organization ID directly from AccountStore inside the function.

Comment thread frontend/web/components/pages/CreateEnvironmentPage.tsx
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 27, 2026

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  37.8 seconds
commit  d7605fc
info  🔄 Run: #17024 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  42.1 seconds
commit  d7605fc
info  🔄 Run: #17024 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  39.8 seconds
commit  d7605fc
info  🔄 Run: #17024 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  40.6 seconds
commit  d7605fc
info  🔄 Run: #17024 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  33.2 seconds
commit  e047a29
info  🔄 Run: #17027 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  32.7 seconds
commit  e047a29
info  🔄 Run: #17027 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  43.2 seconds
commit  e047a29
info  🔄 Run: #17027 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  3 passed

Details

stats  3 tests across 3 suites
duration  42.6 seconds
commit  e047a29
info  🔄 Run: #17027 (attempt 1)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 27, 2026

Visual Regression

19 screenshots compared. See report for details.
View full report

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request front-end Issue related to the React Front End Dashboard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add option to choose an environment admin when creating an environment

1 participant