diff --git a/app/api/src/lib/owner.js b/app/api/src/lib/owner.js index e6b934e..7a03bbc 100644 --- a/app/api/src/lib/owner.js +++ b/app/api/src/lib/owner.js @@ -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 } diff --git a/app/web/src/components/PartProfile/PartProfile.js b/app/web/src/components/PartProfile/PartProfile.js index 222a47b..4159333 100644 --- a/app/web/src/components/PartProfile/PartProfile.js +++ b/app/web/src/components/PartProfile/PartProfile.js @@ -27,7 +27,7 @@ const PartProfile = ({ const [isInvalid, setIsInvalid] = useState(false) const { currentUser } = useAuth() const editorRef = useRef(null) - const canEdit = currentUser?.sub === userPart.id + const canEdit = currentUser?.sub === userPart.id || currentUser?.roles.includes('admin') const isImageEditable = !isEditable && canEdit // image is editable when not in profile edit mode in order to separate them as it's too hard too to upload an image to cloudinary temporarily until the use saves (and maybe have to clean up) for the time being const part = userPart?.Part const emotes = countEmotes(part?.Reaction)