Files
klz-cables.com/.pnpm-store/v10/files/b6/281a1a231b182c133c5b9118aca7daac6238e00f91f4bc76da5bb8f799dd59e8afb4fa0f9933db9c3c3c1a75ce1bae3db1f6b99229910c0c5be478e7c8fea7
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

26 lines
677 B
Plaintext

import { Forbidden } from '../errors/index.js';
export const executeAccess = async ({ id, data, disableErrors, isReadingStaticFile = false, req }, access)=>{
if (access) {
const resolvedConstraint = await access({
id,
data,
isReadingStaticFile,
req
});
if (!resolvedConstraint) {
if (!disableErrors) {
throw new Forbidden(req.t);
}
}
return resolvedConstraint;
}
if (req.user) {
return true;
}
if (!disableErrors) {
throw new Forbidden(req.t);
}
return false;
};
//# sourceMappingURL=executeAccess.js.map