mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 18:15:53 +00:00
Requested changes
This commit is contained in:
@@ -121,8 +121,7 @@ export const registerOrgRouter = async (server: FastifyZodProvider) => {
|
||||
endDate: req.query.endDate,
|
||||
startDate: req.query.startDate || getLastMidnightDateISO(),
|
||||
auditLogActor: req.query.actor,
|
||||
actor: req.permission.type,
|
||||
projectId: null
|
||||
actor: req.permission.type
|
||||
});
|
||||
return { auditLogs };
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { z } from "zod";
|
||||
|
||||
import { ProjectsSchema, UserEncryptionKeysSchema, UsersSchema } from "@app/db/schemas";
|
||||
import { UserEncryptionKeysSchema, UsersSchema } from "@app/db/schemas";
|
||||
import { getConfig } from "@app/lib/config/env";
|
||||
import { logger } from "@app/lib/logger";
|
||||
import { authRateLimit, readLimit, writeLimit } from "@app/server/config/rateLimiter";
|
||||
@@ -151,34 +151,20 @@ export const registerUserRouter = async (server: FastifyZodProvider) => {
|
||||
id: z.string(),
|
||||
name: z.string(),
|
||||
slug: z.string(),
|
||||
orgId: z.string(),
|
||||
projectMemberships: z.array(
|
||||
z.object({
|
||||
id: z.string(),
|
||||
project: ProjectsSchema.pick({ id: true, name: true, slug: true }),
|
||||
roles: z.array(
|
||||
z.object({
|
||||
id: z.string(),
|
||||
role: z.string(),
|
||||
customRoleId: z.string().nullable(),
|
||||
customRoleName: z.string().nullable(),
|
||||
customRoleSlug: z.string().nullable(),
|
||||
temporaryRange: z.string().nullable(),
|
||||
temporaryMode: z.string().nullable(),
|
||||
temporaryAccessEndTime: z.string().nullable(),
|
||||
temporaryAccessStartTime: z.string().nullable(),
|
||||
isTemporary: z.boolean()
|
||||
})
|
||||
)
|
||||
})
|
||||
)
|
||||
orgId: z.string()
|
||||
})
|
||||
.array()
|
||||
}
|
||||
},
|
||||
onRequest: verifyAuth([AuthMode.JWT]),
|
||||
handler: async (req) => {
|
||||
const groupMemberships = await server.services.user.listUserGroups(req.params.username, req.permission.orgId);
|
||||
const groupMemberships = await server.services.user.listUserGroups({
|
||||
username: req.params.username,
|
||||
actorOrgId: req.permission.orgId,
|
||||
actorId: req.permission.id,
|
||||
actorAuthMethod: req.permission.authMethod,
|
||||
actor: req.permission.type
|
||||
});
|
||||
|
||||
return groupMemberships;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user