Skip to content

Conversation

@h1Anonymoush1
Copy link

@h1Anonymoush1 h1Anonymoush1 commented Nov 2, 2025

What does this PR do?

So the issue #1448 was still open and that actual issue was not around anymore. But there was a issue that it treats users/verified and users/unverified as like user:id which opens a bubble, users/verified and users/unverified when clicking opens a bubble but its empty so i added two extra cases after any , guest , users , i added users/verified and users/unverified

Test Plan

i ran it locally and it worked.

Related PRs and Issues

(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)

Have you read the Contributing Guidelines on issues?

please review this is my first contribution let me know if everything is good

Summary by CodeRabbit

  • New Features
    • Added distinct role labels in the permissions interface to differentiate between verified and unverified users.

@appwrite
Copy link

appwrite bot commented Nov 2, 2025

Console

Project ID: 688b7bf400350cbd60e9

Sites (1)
Site Status Logs Preview QR
 console-stage
688b7cf6003b1842c9dc
Failed Failed Authorize Preview URL QR Code

Tip

Cursor pagination performs better than offset pagination when loading further pages.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 2, 2025

Walkthrough

This change adds two new conditional branches to the permissions row component to handle additional role types. When the role matches either 'users/verified' or 'users/unverified', the component now displays "Verified Users" or "Unverified Users" respectively. These conditions are inserted before the existing fallback case, ensuring these specific roles are handled before the generic "any" role condition.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

  • Verify that the role value strings ('users/verified' and 'users/unverified') are correct and consistent with the system's role definitions
  • Confirm the display text ("Verified Users" and "Unverified Users") is appropriate for the UI context
  • Check that the conditional ordering is intentional and the placement before the {:else if role === 'any'} branch is correct
  • Ensure this change aligns with the intended role hierarchy and permission display logic

Pre-merge checks and finishing touches

✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The pull request title "added cases for verified and unverified users" directly and accurately describes the primary change in the changeset. The modifications add two new conditional branches in the permissions row component to handle the "users/verified" and "users/unverified" roles, rendering appropriate display text for each case. The title is concise, specific, and avoids vague terminology, making it clear to reviewers what the change accomplishes without needing to inspect the full diff.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2421a44 and 45d4691.

📒 Files selected for processing (1)
  • src/lib/components/permissions/row.svelte (1 hunks)
🔇 Additional comments (1)
src/lib/components/permissions/row.svelte (1)

138-141: LGTM! Fix correctly handles the special role types.

The implementation properly prevents 'users/verified' and 'users/unverified' from falling into the complex :else block where they would be incorrectly parsed as custom permissions with invalid formatting. The pattern is consistent with existing simple role cases and uses user-friendly labels.

Verification confirms these are the only users/ variants in the codebase, so the fix is complete.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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