Skip to content

feat: add rules.read and rules.write to API key scopes#2972

Open
singhvishalkr wants to merge 1 commit intoappwrite:mainfrom
singhvishalkr:fix/add-rules-scopes
Open

feat: add rules.read and rules.write to API key scopes#2972
singhvishalkr wants to merge 1 commit intoappwrite:mainfrom
singhvishalkr:fix/add-rules-scopes

Conversation

@singhvishalkr
Copy link
Copy Markdown

What does this PR do?

Adds the missing rules.read and rules.write scope definitions to the API key scopes list in src/lib/constants.ts.

These scopes are already included in defaultScopes but were missing from the selectable scope definitions, making them invisible in the API key creation/editing UI.

Closes #2156

Changes

  • Added rules.read and rules.write entries to the scopes array with appropriate descriptions, matching the style of existing scope definitions.

How to test

  1. Navigate to API Keys section in the Console
  2. Create or edit an API key
  3. Verify that rules.read and rules.write now appear in the scopes list

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 11, 2026

Greptile Summary

This PR adds the two missing rules.read and rules.write scope definitions to the selectable scopes array in src/lib/constants.ts, making them visible in the API key creation/editing UI. Both scopes were already present in defaultScopes but lacked a corresponding UI definition. The additions follow existing conventions: 'Other' category, 'globe' icon, and description phrasing matching peer entries.

Confidence Score: 5/5

Safe to merge — minimal, targeted change that fixes a missing UI definition with no logic impact.

Only one file changed with two new constant entries that mirror existing patterns exactly. The scopes were already present in defaultScopes, so there is no risk of introducing unknown scope strings. The UI groups scopes by category, so the insertion position in the array has no visual side-effect. No logic, auth, or data-path changes.

No files require special attention.

Important Files Changed

Filename Overview
src/lib/constants.ts Adds rules.read and rules.write scope definitions to the scopes array; both were already present in defaultScopes and now appear correctly in the UI with matching description style, 'Other' category, and 'globe' icon.

Reviews (1): Last reviewed commit: "feat: add rules.read and rules.write to ..." | Re-trigger Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 Bug Report: Missing Scopes in API keys

1 participant