unleash-server
Version:
Unleash is an enterprise ready feature flag service. It provides different strategies for handling feature flags.
11 lines • 772 B
TypeScript
import type { IUnleashConfig } from '../types/option.js';
import type { IUnleashStores } from '../types/stores.js';
import type User from '../types/user.js';
import type { Request } from 'express';
export interface PermissionChecker {
hasPermission(user: User, permissions: string[], projectId?: string, environment?: string): Promise<boolean>;
}
export declare function findParam(name: string, { params, body }: Request, defaultValue?: string): string | undefined;
declare const rbacMiddleware: (config: Pick<IUnleashConfig, "getLogger" | "isOss">, { featureToggleStore, segmentStore, }: Pick<IUnleashStores, "featureToggleStore" | "segmentStore">, accessService: PermissionChecker) => any;
export default rbacMiddleware;
//# sourceMappingURL=rbac-middleware.d.ts.map