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
1 line
870 B
Plaintext
1 line
870 B
Plaintext
{"version":3,"sources":["../../src/auth/extractAccessFromPermission.ts"],"sourcesContent":["import type { AccessResult } from '../config/types.js'\nimport type { Permission } from './index.js'\n\nexport const extractAccessFromPermission = (hasPermission: boolean | Permission): AccessResult => {\n if (typeof hasPermission === 'boolean') {\n return hasPermission\n }\n\n const { permission, where } = hasPermission\n if (!permission) {\n return false\n }\n if (where && typeof where === 'object') {\n return where\n }\n return true\n}\n"],"names":["extractAccessFromPermission","hasPermission","permission","where"],"mappings":"AAGA,OAAO,MAAMA,8BAA8B,CAACC;IAC1C,IAAI,OAAOA,kBAAkB,WAAW;QACtC,OAAOA;IACT;IAEA,MAAM,EAAEC,UAAU,EAAEC,KAAK,EAAE,GAAGF;IAC9B,IAAI,CAACC,YAAY;QACf,OAAO;IACT;IACA,IAAIC,SAAS,OAAOA,UAAU,UAAU;QACtC,OAAOA;IACT;IACA,OAAO;AACT,EAAC"} |