mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
fix: review changes
This commit is contained in:
@@ -417,7 +417,7 @@ export const registerIdentityTokenAuthRouter = async (server: FastifyZodProvider
|
||||
},
|
||||
onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
|
||||
schema: {
|
||||
hide: false,
|
||||
hide: true,
|
||||
tags: [ApiDocsTags.TokenAuth],
|
||||
description: "Get token for machine identity with Token Auth",
|
||||
security: [
|
||||
@@ -441,8 +441,7 @@ export const registerIdentityTokenAuthRouter = async (server: FastifyZodProvider
|
||||
actor: req.permission.type,
|
||||
actorId: req.permission.id,
|
||||
actorOrgId: req.permission.orgId,
|
||||
actorAuthMethod: req.permission.authMethod,
|
||||
isActorSuperAdmin: isSuperAdmin(req.auth)
|
||||
actorAuthMethod: req.permission.authMethod
|
||||
});
|
||||
|
||||
await server.services.auditLog.createAuditLog({
|
||||
@@ -493,8 +492,7 @@ export const registerIdentityTokenAuthRouter = async (server: FastifyZodProvider
|
||||
actor: req.permission.type,
|
||||
actorId: req.permission.id,
|
||||
actorOrgId: req.permission.orgId,
|
||||
actorAuthMethod: req.permission.authMethod,
|
||||
isActorSuperAdmin: isSuperAdmin(req.auth)
|
||||
actorAuthMethod: req.permission.authMethod
|
||||
});
|
||||
|
||||
await server.services.auditLog.createAuditLog({
|
||||
|
||||
@@ -621,7 +621,6 @@ export const identityTokenAuthServiceFactory = ({
|
||||
|
||||
const getTokenAuthTokenById = async ({
|
||||
tokenId,
|
||||
isActorSuperAdmin,
|
||||
actorId,
|
||||
actor,
|
||||
actorAuthMethod,
|
||||
@@ -644,8 +643,6 @@ export const identityTokenAuthServiceFactory = ({
|
||||
throw new NotFoundError({ message: `Failed to find identity with ID ${foundToken.identityId}` });
|
||||
}
|
||||
|
||||
await validateIdentityUpdateForSuperAdminPrivileges(foundToken.identityId, isActorSuperAdmin);
|
||||
|
||||
if (!identityMembershipOrg.identity.authMethods.includes(IdentityAuthMethod.TOKEN_AUTH)) {
|
||||
throw new BadRequestError({
|
||||
message: "The identity does not have Token Auth"
|
||||
|
||||
@@ -42,7 +42,6 @@ export type TGetTokenAuthTokensDTO = {
|
||||
|
||||
export type TGetTokenAuthTokenByIdDTO = {
|
||||
tokenId: string;
|
||||
isActorSuperAdmin?: boolean;
|
||||
} & Omit<TProjectPermission, "projectId">;
|
||||
|
||||
export type TUpdateTokenAuthTokenDTO = {
|
||||
|
||||
Reference in New Issue
Block a user