mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 09:35:37 +00:00
Run linter
This commit is contained in:
@@ -1,23 +1,16 @@
|
||||
import { Types } from "mongoose";
|
||||
import {
|
||||
IServiceAccount,
|
||||
IServiceTokenData,
|
||||
IUser,
|
||||
Membership,
|
||||
ServiceAccount,
|
||||
ServiceTokenData,
|
||||
User,
|
||||
} from "../models";
|
||||
import { validateServiceAccountClientForWorkspace } from "./serviceAccount";
|
||||
import { validateUserClientForWorkspace } from "./user";
|
||||
import { validateServiceTokenDataClientForWorkspace } from "./serviceTokenData";
|
||||
import {
|
||||
MembershipNotFoundError,
|
||||
UnauthorizedRequestError,
|
||||
} from "../utils/errors";
|
||||
import { AuthData } from "../interfaces/middleware";
|
||||
import { ActorType } from "../ee/models";
|
||||
import { auth } from "../routes/v1";
|
||||
|
||||
/**
|
||||
* Validate authenticated clients for membership with id [membershipId] based
|
||||
|
||||
@@ -36,9 +36,10 @@ export const validateClientForOrganization = async ({
|
||||
});
|
||||
}
|
||||
|
||||
let membershipOrg;
|
||||
switch (authData.actor.type) {
|
||||
case ActorType.USER:
|
||||
const membershipOrg = await validateUserClientForOrganization({
|
||||
membershipOrg = await validateUserClientForOrganization({
|
||||
user: authData.authPayload as IUser,
|
||||
organization,
|
||||
acceptedRoles,
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { Types } from "mongoose";
|
||||
import {
|
||||
ISecret,
|
||||
Secret,
|
||||
IUser,
|
||||
IServiceTokenData,
|
||||
IUser,
|
||||
Secret,
|
||||
} from "../models";
|
||||
import { validateUserClientForSecret, validateUserClientForSecrets } from "./user";
|
||||
import { validateServiceTokenDataClientForSecrets, validateServiceTokenDataClientForWorkspace } from "./serviceTokenData";
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import net from "net";
|
||||
import { Types } from "mongoose";
|
||||
import {
|
||||
SecretBlindIndexData,
|
||||
IServiceTokenData,
|
||||
IServiceTokenData,
|
||||
IUser,
|
||||
SecretBlindIndexData,
|
||||
Workspace,
|
||||
} from "../models";
|
||||
import {
|
||||
@@ -78,9 +78,10 @@ export const validateClientForWorkspace = async ({
|
||||
});
|
||||
}
|
||||
|
||||
let membership;
|
||||
switch (authData.actor.type) {
|
||||
case ActorType.USER:
|
||||
const membership = await validateUserClientForWorkspace({
|
||||
membership = await validateUserClientForWorkspace({
|
||||
user: authData.authPayload as IUser,
|
||||
workspaceId,
|
||||
environment,
|
||||
|
||||
Reference in New Issue
Block a user