feat: rework the entire pre-auth keys page
This commit is contained in:
parent
785d5a663f
commit
3dca401837
9 changed files with 315 additions and 144 deletions
|
|
@ -69,6 +69,10 @@ export async function loader({
|
|||
agents: context.agents?.tailnetIDs(),
|
||||
stats: context.agents?.lookup(machines.nodes.map((node) => node.nodeKey)),
|
||||
writable: writablePermission,
|
||||
preAuth: await context.sessions.check(
|
||||
request,
|
||||
Capabilities.generate_authkeys,
|
||||
),
|
||||
subject: user.subject,
|
||||
};
|
||||
}
|
||||
|
|
@ -99,6 +103,7 @@ export default function Page() {
|
|||
server={data.publicServer ?? data.server}
|
||||
users={data.users}
|
||||
isDisabled={!data.writable}
|
||||
disabledKeys={data.preAuth ? [] : ['pre-auth']}
|
||||
/>
|
||||
</div>
|
||||
<table className="table-auto w-full rounded-lg">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue