Skip to content

feat(protected_environments): edit approval group membership - #655

Merged
sjungwon03 merged 2 commits into
devfrom
feat/654-approval-group-inheritance
Oct 18, 2026
Merged

sjungwon03 merged 2 commits into
devfrom
feat/654-approval-group-inheritance

Conversation

@sjungwon03

Copy link
Copy Markdown
Member

Summary

Existing group-based project protected-environment approval rules can now switch
between direct membership and inherited membership. Only explicitly reported
0/1 settings on known group rules are editable. The dialog shows the current
membership, group/rule IDs and approval count, then requires a changed choice,
the exact environment name and acknowledgement. It warns about expanding
approver eligibility or blocking deployments when narrowing it.

Complete paginated inventory and strict detail preflight precede one PUT with
only the target rule ID and group_inheritance_type. Strict response comparison
and an authoritative read-back preserve the group, approval count, every other
approval/deploy grant and legacy count. Writes never follow redirects or replay
authentication; uncertainty requires inspection and renewed confirmation, and
account replacement isolates late results.

Closes #654

Validation

  • dart format --output=none --set-exit-if-changed . (999 files, no changes)
  • flutter analyze --no-pub reports no issues; CI English language policy passes
  • App and every package test suite pass: app 4,747; API 3,284; design system 135; models 204; secure storage 5 (8,375 total)
  • API, controller and UI tests observed failing before implementation
  • Related new/existing approval UI/controller suite: 105 tests pass
  • Localization generated with flutter gen-l10n; models unchanged
  • Five locales, 320/800/1200 widths, both themes and both edit directions;
    unknown/unchanged/non-group targets, stale/ambiguous environments,
    preservation, uncertainty, overlap, pending locking and account replacement.
  • Synthetic widget validation only; no live GitLab role/tier/version validation.

Checklist

  • Targets dev; independent branch from latest origin/dev
  • Linked issue with Closes #654
  • Conventional Commit title and DCO sign-off
  • Behavior documentation, screenshot evidence and MW-02 tracking updated
  • Mobile/tablet/desktop, light/dark coverage
  • No dependencies, model changes, or external assets added; notices unchanged
  • Dummy credentials, reserved example domains and fixture-only screenshots
  • English repository content except supported localization resources

Screenshots

Synthetic widget captures with real local fonts, scrolled to confirmation:

Viewport Light Dark
Mobile Mobile light Mobile dark
Desktop Desktop light Desktop dark

Notes for reviewers

GitLab defines group_inheritance_type 0 as direct membership only and 1 as
including inherited groups. Premium/Ultimate, project CI/CD, appropriate
management permissions and shared-group eligibility remain server requirements.
This slice does not enumerate approvers or infer whether approval counts can
be satisfied. Group-level rules and unreported/future membership values remain
read-only; user/role grants and group replacement are separate work.

The existing strict approval-group reader is reused. A changed response or
read-back in any other modelled field is an unconfirmed write, requiring fresh
inspection. The endpoint offers no atomic compare-and-set, so another actor can
still change the rule between requests. Unknown server metadata is outside the
modelled preservation comparison. No model code generation is needed.

References: group inheritance,
protected-environment update,
implementation notes.

Allow explicit direct or inherited membership changes on existing approval groups while preserving all other rule fields. Require complete preflight, changed-value consent, single-attempt transport and authoritative confirmation so unknown membership and stale sessions cannot authorize updates.

Signed-off-by: sjungwon03 <sjungwon03@gmail.com>
@github-actions github-actions Bot added area:api packages/gitlab_api — GitLab REST/GraphQL client area:ui Screens and feature UI area:docs AGENTS.md, .agents/, README and friends feat New feature labels Oct 18, 2026
Record the concrete review artifact while retaining the pending CI and approval boundary.

Signed-off-by: sjungwon03 <sjungwon03@gmail.com>

@sjungwon03-ai sjungwon03-ai left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Review summary

Verdict: Approved

  • Reviewed: protected-environment approval-group inheritance edit flow, API write guards, and regression coverage
  • Checks: GitHub CI passed

@sjungwon03
sjungwon03 merged commit c76bfad into dev Oct 18, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:api packages/gitlab_api — GitLab REST/GraphQL client area:docs AGENTS.md, .agents/, README and friends area:ui Screens and feature UI feat New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Edit inherited membership for protected environment approval groups

2 participants