This commit is contained in:
Owen
2025-08-30 22:28:37 -07:00
parent 4e106e9e5a
commit f37eda4739
2 changed files with 2 additions and 13 deletions

View File

@@ -82,6 +82,7 @@ authenticated.delete(
"/org/:orgId",
verifyOrgAccess,
verifyUserIsOrgOwner,
verifyUserHasAction(ActionsEnum.deleteOrg),
org.deleteOrg
);

View File

@@ -49,19 +49,7 @@ export async function deleteOrg(
}
const { orgId } = parsedParams.data;
// Check if the user has permission to list sites
const hasPermission = await checkUserActionPermission(
ActionsEnum.deleteOrg,
req
);
if (!hasPermission) {
return next(
createHttpError(
HttpCode.FORBIDDEN,
"User does not have permission to perform this action"
)
);
}
const [org] = await db
.select()
.from(orgs)