allow tokens to limit a user's rank

This commit is contained in:
Hazelnoot 2025-06-21 09:46:31 -04:00
parent a4c816d07c
commit 70b85e5215
8 changed files with 72 additions and 4 deletions

View file

@ -60,6 +60,7 @@ export const paramDef = {
grantees: { type: 'array', uniqueItems: true, items: {
type: 'string',
} },
rank: { type: 'string', enum: ['admin', 'mod', 'user'], nullable: true },
},
required: ['session', 'permission'],
} as const;
@ -109,6 +110,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
description: ps.description,
iconUrl: ps.iconUrl,
permission: ps.permission,
rank: ps.rank,
});
// Insert shared access grants