Fix org security avatars and member links#1536
Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📝 WalkthroughWalkthroughThe PR enhances Security.vue by introducing router-based navigation to the members page and integrating signed image URLs for member avatars across MFA and password policy sections. Copy-email actions are replaced with combined view-members and copy-email button pairs. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Pull request overview
This pull request fixes avatar display for organization members on the security page by implementing signed image URLs, and adds navigation buttons to view the members page from security-related warnings and member lists.
Changes:
- Implements signed image URL generation for member avatars using
createSignedImageUrlfrom the storage service - Adds a
goToMembersPagefunction for navigation to the members page with optional dialog dismissal - Adds "View Members" buttons to four locations: 2FA warning section, password policy warning section, 2FA enforcement dialog, and password policy enforcement dialog
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@src/pages/settings/organization/Security.vue`:
- Line 45: The file references useRouter via the const router = useRouter() call
but lacks an explicit import; add an explicit import statement "import {
useRouter } from 'vue-router'" at the top of Security.vue (matching the
project's convention used elsewhere) so useRouter is explicitly imported before
it's used.
🧹 Nitpick comments (3)
src/pages/settings/organization/Security.vue (3)
253-263: Consider error resilience for individual image signing failures.If
createSignedImageUrlthrows for any member, the entirePromise.allrejects and no members will be displayed. Consider handling failures per-member to ensure partial success.♻️ Proposed defensive approach
membersWithMfaStatus.value = await Promise.all((members || []).map(async (member) => { - const signedImage = member.image_url ? await createSignedImageUrl(member.image_url) : '' + let signedImage = '' + if (member.image_url) { + try { + signedImage = await createSignedImageUrl(member.image_url) || '' + } + catch { + // Fall back to no image if signing fails + } + } return { uid: member.uid, email: member.email, image_url: signedImage || '',
318-331: Same error resilience concern as MFA loading; consider extracting shared logic.This follows the same pattern as
loadMembersWithMfaStatus. Both could benefit from a shared helper that safely signs image URLs with per-item error handling.
966-981: Consider using DaisyUI button components for consistency.Per coding guidelines, interactive elements should use DaisyUI components (e.g.,
d-btn). However, this matches the existing button styling pattern used throughout the file, so this is a low-priority optional refactor.
|



Summary (AI generated)
Test plan (AI generated)
Screenshots (AI generated)
Checklist (AI generated)
.
accordingly.
my tests
Generated with AI
Summary by CodeRabbit
New Features
UI Changes
✏️ Tip: You can customize this high-level summary in your review settings.