Conversation
Because: - fxa_oauth.scopes is only seeded from the OAUTH_SCOPES env var at auth-server boot, so there is no way to add or remove a scope in deployed (k8s) environments without a redeploy. - Downstream work needs to reference scope rows by a stable numeric id and accept arbitrary scope values (including the empty string). This commit: - Adds patch-036-037.sql: replaces the `scope` PRIMARY KEY with an AUTO_INCREMENT `id`, keeping `scope` as a UNIQUE index so grant-time lookups are unchanged. - Adds the Scope model (fxa-shared) and an OAuthScopesController at /api/oauth-scopes: GET (list), POST (create), DELETE :id. Create validates body shape and the 128-char limit, accepts any string, and maps ER_DUP_ENTRY to 409; delete returns 404 when missing. - Adds OAuthScopes (view), CreateOAuthScope, and DeleteOAuthScope AdminPanelFeatures, gating create/delete to Admin and view to Support (mirrors the WafTokens split). - Adds PageOAuthScopes (list, create form, per-row delete behind a confirm dialog and warning banner) plus Nav and route wiring. Closes FXA-13786
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Because:
This commit:
scopePRIMARY KEY with an AUTO_INCREMENTid, keepingscopeas a UNIQUE index so grant-time lookups are unchanged.Closes FXA-13786
Checklist
Put an
xin the boxes that applyHow to review (Optional)
Screenshots (Optional)
Please attach the screenshots of the changes made in case of change in user interface.
Other information (Optional)
Any other information that is important to this pull request.