[fix] Re-introduce beforeUpdateOneObject hook (#5495)

... and disable name edition in object edition form. This feature will
be introduced by #5491
This commit is contained in:
Marie
2024-05-21 10:46:49 +02:00
committed by GitHub
parent eb78be6c61
commit 0d16051ded
5 changed files with 23 additions and 8 deletions

View File

@ -30,10 +30,8 @@ export class BeforeUpdateOneObject<T extends UpdateObjectPayload>
// TODO: this logic could be moved to a policy guard
async run(
instance: UpdateOneInputType<T>,
context: any,
workspaceId: string,
): Promise<UpdateOneInputType<T>> {
const workspaceId = context?.req?.user?.workspace?.id;
if (!workspaceId) {
throw new UnauthorizedException();
}