Allow admins to edit parts

Needed for moderation
This commit is contained in:
Kurt Hutten
2021-06-25 19:43:14 +10:00
parent 87e43ab7ce
commit 29999bc2ce
2 changed files with 4 additions and 1 deletions

View File

@@ -12,6 +12,9 @@ export const requireOwnership = async ({ userId, userName, partId } = {}) => {
}
if (context.currentUser.roles?.includes('admin')) {
if (context.currentUser?.sub === '5cea3906-1e8e-4673-8f0d-89e6a963c096') {
throw new ForbiddenError("That's a local admin ONLY.")
}
return
}