"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getPermissionContext = getPermissionContext;
exports.parseDataScope = parseDataScope;
function getPermissionContext(user) {
    return {
        sub: user?.sub ?? '',
        owner_id: user?.owner_id ?? user?.sub ?? '',
        role: user?.role ?? 'member',
        access_role_id: user?.access_role_id ?? null,
    };
}
function parseDataScope(value) {
    if (value === 'own' || value === 'all') {
        return value;
    }
    return undefined;
}
//# sourceMappingURL=permission-request.util.js.map