User generatable API tokens (#2621)

This commit is contained in:
Kalle
2025-11-09 11:07:20 +02:00
committed by GitHub
parent 47e9262d40
commit ff4402d9aa
38 changed files with 1045 additions and 20 deletions

View File

@@ -323,6 +323,7 @@ export async function findLeanById(id: number) {
"User.isArtist",
"User.isVideoAdder",
"User.isTournamentOrganizer",
"User.isApiAccesser",
"User.patronTier",
"User.languages",
"User.inGameName",
@@ -341,7 +342,12 @@ export async function findLeanById(id: number) {
if (!user) return;
return {
...R.omit(user, ["isArtist", "isVideoAdder", "isTournamentOrganizer"]),
...R.omit(user, [
"isArtist",
"isVideoAdder",
"isTournamentOrganizer",
"isApiAccesser",
]),
roles: userRoles(user),
};
}