Skip to content

fix(console): accept users/verified in custom permission roles - #14662

Merged
HarshMN2345 merged 2 commits into
mainfrom
fix-console-users-verified-permission
Oct 19, 2026
Merged

HarshMN2345 merged 2 commits into
mainfrom
fix-console-users-verified-permission

Conversation

@HarshMN2345

Copy link
Copy Markdown
Member

What does this PR do?

The Add by role string dialog in the permissions editor only accepted user:, team: and member: strings, so users/verified and users/unverified were rejected with a format error. The server accepts both, which is why setting them through the CLI worked.

The validator now accepts users/verified and users/unverified. users:verified stays invalid, matching the server.

Test Plan

Ran this branch's console against a local stack:

  • Typed users/verified into Add by role string on a table's Security tab: no format error, Add enabled.
  • Added it, ticked Read, clicked Update. GET /v1/tablesdb/:databaseId/tables/:tableId returned $permissions: ["read(\"users/verified\")"].
  • ESLint passes on the changed file.

The Add by role string dialog only accepted user:, team: and member: strings, so users/verified and users/unverified were rejected even though the server accepts them.
@luxor-code-review

luxor-code-review Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Review complete. No blocking issues — approved ✅; 1 nitpick below.

🧹 Nitpicks (1) — 🟢 1 low
  • 🟢 Document new users/verified roles in modal copy (PermissionsEditor.tsx:1182) — isValidPermissionFormat now accepts users/verified and users/unverified (PermissionsEditor.tsx:1182), but the rest of the editor was not updated.

Extends the console's custom permission editor to accept the server's new dimension-based users/verified and users/unverified roles, so project admins can assign them like existing roles. Validation matches the exact strings only, and stored/exported values use the type/dimension form the backend already authorizes against.

Files Change
apps/console/.../auth/PermissionsEditor.tsx Adds users/verified and users/unverified to isValidPermissionFormat(); the modal helper copy does not yet mention the new formats (flagged as a low-severity doc note).

Reviewed commit: 52e4a2b

@appwrite

appwrite Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

New Console

Project ID: new-console

Sites (1)
Site Status Logs Preview QR
 New Console
new-console
Ready Ready View Logs Preview URL QR Code

Tip

Appwrite has crossed the 50K GitHub stars milestone with hundreds of active contributors

@ghost

ghost commented Oct 19, 2026 •

Copy link
Copy Markdown

🟢 Tier S · Ready to merge

The latest change resolves the outstanding regex-guideline finding and introduces no remaining issues.

The permissions editor’s custom role-string validator accepts users/verified and users/unverified in addition to the existing user, team, and membership formats. These built-in roles can now be entered through the Add by role string dialog while users:verified remains invalid.

Latest changes: The newest commit replaces the regex for the two built-in role strings with direct string comparisons.

Verdict New comments Fixed Still open
✅ Approved 0 1 0
📂 Walkthrough · 1
File Change
apps/console/src/components/pages/projects/$projectId/auth/PermissionsEditor.tsx Accepts both built-in users roles in the custom role-string validator using direct comparisons.
✅ Fixed since the last review · 1
  • Avoid adding a regex for two fixed roles · apps/console/src/components/pages/projects/$projectId/auth/PermissionsEditor.tsx:1182

Reviewed the commits since 52e4a2b · Details · Comment @hansi-codes review to re-run, or mention @hansi-codes with a question.

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Tier A · Looks good to merge. Summary

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Tier S · Looks good to merge. Summary

@HarshMN2345
HarshMN2345 merged commit ca02889 into main Oct 19, 2026
25 of 26 checks passed
@ChiragAgg5k ChiragAgg5k mentioned this pull request Oct 21, 2026
6 tasks
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.

1 participant