UNPKG

@directus/api

Version:

Directus is a real-time API and App dashboard for managing SQL database content

15 lines (14 loc) 447 B
//#region src/utils/is-unauthenticated.ts /** * Checks if the given accountability is unauthenticated * * @param accountability * @returns True if the user is unauthenticated, false otherwise. */ function isUnauthenticated(accountability) { if (accountability === null) return false; if (accountability === void 0) return true; return accountability?.role === null && accountability?.user === null; } //#endregion export { isUnauthenticated };