mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-04 21:04:37 +08:00
Revert buggy change
This commit is contained in:
parent
4ddf6a5291
commit
71e6562e6f
@ -16,17 +16,14 @@ export const adminUserProjectsCrudHandlers = createLazyProxy(() => createCrudHan
|
||||
projectId: projectIdSchema.defined(),
|
||||
}),
|
||||
onPrepare: async ({ auth }) => {
|
||||
if (auth.project.id !== "internal") {
|
||||
throw new KnownErrors.ExpectedInternalProject();
|
||||
}
|
||||
if (!auth.user) {
|
||||
throw new KnownErrors.UserAuthenticationRequired;
|
||||
}
|
||||
},
|
||||
onCreate: async ({ auth, data }) => {
|
||||
if (auth.project.id !== "internal") {
|
||||
throw new KnownErrors.ExpectedInternalProject();
|
||||
}
|
||||
},
|
||||
onCreate: async ({ auth, data }) => {
|
||||
const user = auth.user ?? throwErr('auth.user is required');
|
||||
const prisma = await getPrismaClientForTenancy(auth.tenancy);
|
||||
await ensureTeamMembershipExists(prisma, {
|
||||
@ -53,9 +50,6 @@ export const adminUserProjectsCrudHandlers = createLazyProxy(() => createCrudHan
|
||||
};
|
||||
},
|
||||
onList: async ({ auth }) => {
|
||||
if (auth.project.id !== "internal") {
|
||||
throw new KnownErrors.ExpectedInternalProject();
|
||||
}
|
||||
if (!auth.user) {
|
||||
throw new KnownErrors.UserAuthenticationRequired();
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user