Passkeys: your own under Account › Credentials #251
No files matched your search
@@ -118,6 +118,11 @@ const CUSTOM_PAGES: Record<string, ComponentType> = {
|
||||
() => import('@/features/deletedAccounts/DeletedAccountsPage'),
|
||||
(m) => m.DeletedAccountsPage,
|
||||
),
|
||||
// Account › Credentials: the signed-in account's own passkeys (#250)
|
||||
Passkeys: onDemand(
|
||||
() => import('@/features/passkeys/OwnPasskeysPage'),
|
||||
(m) => m.OwnPasskeysPage,
|
||||
),
|
||||
Deliverability: onDemand(
|
||||
() => import('@/features/deliverability/DeliverabilityPage'),
|
||||
(m) => m.DeliverabilityPage,
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2026 Coffey Labs LLC
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
/**
|
||||
* INBUXA: Account › Credentials › Passkeys (#250). The same card an
|
||||
* administrator sees on Directory › Accounts, for the signed-in account, so
|
||||
* anyone who can open the console manages their own passkeys without
|
||||
* needing access to the account list.
|
||||
*/
|
||||
|
||||
import { Loader2 } from 'lucide-react';
|
||||
import { useAuthStore } from '@/stores/authStore';
|
||||
import { PasskeysPanel } from './PasskeysPanel';
|
||||
|
||||
export function OwnPasskeysPage() {
|
||||
const accountId = useAuthStore((s) => s.primaryAccountId);
|
||||
if (!accountId) return <Loader2 className="mx-auto h-4 w-4 animate-spin text-muted-foreground" />;
|
||||
return <PasskeysPanel accountId={accountId} />;
|
||||
}
|
||||
@@ -67,6 +67,11 @@ describe('layout visibility', () => {
|
||||
expect(visibleLayouts(schema, 'enterprise', ehlo).map((l) => l.name)).toEqual(['Settings']);
|
||||
});
|
||||
|
||||
it('shows your own passkeys to an account that may read passkeys (#250)', () => {
|
||||
expect(isLinkVisible(schema, 'CustomComponent/Passkeys', 'oss', canGetFrom(['sysPasskeyGet']))).toBe(true);
|
||||
expect(isLinkVisible(schema, 'CustomComponent/Passkeys', 'oss', canGetFrom([]))).toBe(false);
|
||||
});
|
||||
|
||||
it('hides a page this console cannot draw', () => {
|
||||
const all = () => true;
|
||||
expect(isLinkVisible(schema, 'CustomComponent/NotInThisConsole', 'enterprise', all)).toBe(false);
|
||||
|
||||
@@ -65,6 +65,8 @@ const PAGES: Record<string, PageRule> = {
|
||||
'CustomComponent/SharedMailboxes': readOnly('sysAccountLock'),
|
||||
'CustomComponent/DeletedAccounts': readOnly('sysAccount'),
|
||||
'CustomComponent/Deliverability': readOnly('sysDeliverability'),
|
||||
// Your own passkeys, under Account › Credentials (#250)
|
||||
'CustomComponent/Passkeys': readOnly('sysPasskey'),
|
||||
'CustomComponent/ScheduledReports': readOnly('sysScheduledReport'),
|
||||
// A migration has no read permission of its own: running one is the right
|
||||
'CustomComponent/Migrations': { enterprise: false, visible: (c) => holds('sysMigrationRun', c) },
|
||||
|
||||
Reference in new issue
Block a user