[autofix.ci] apply automated fixes

This commit is contained in:
autofix-ci[bot]
2026-03-15 22:43:40 +00:00
committed by GitHub
parent 8127dc4536
commit 5410a56638
8 changed files with 321 additions and 275 deletions
+3 -12
View File
@@ -265,10 +265,7 @@ export const checkServiceAccess = async (
await checkPermission(ctx, { service: [action] });
if (
memberRecord.role !== "owner" &&
memberRecord.role !== "admin"
) {
if (memberRecord.role !== "owner" && memberRecord.role !== "admin") {
if (action === "create") {
if (!memberRecord.accessedProjects.includes(serviceId)) {
throw new TRPCError({
@@ -352,10 +349,7 @@ export const checkEnvironmentDeletionPermission = async (
}
};
export const addNewProject = async (
ctx: PermissionCtx,
projectId: string,
) => {
export const addNewProject = async (ctx: PermissionCtx, projectId: string) => {
const userId = ctx.user.id;
const organizationId = ctx.session.activeOrganizationId;
const memberRecord = await findMemberByUserId(userId, organizationId);
@@ -395,10 +389,7 @@ export const addNewEnvironment = async (
);
};
export const addNewService = async (
ctx: PermissionCtx,
serviceId: string,
) => {
export const addNewService = async (ctx: PermissionCtx, serviceId: string) => {
const userId = ctx.user.id;
const organizationId = ctx.session.activeOrganizationId;
const memberRecord = await findMemberByUserId(userId, organizationId);