mattermost-redux
Version:
Common code (API client, Redux stores, logic, utility functions) for building a Mattermost client
15 lines (14 loc) • 676 B
TypeScript
import type { Role } from '@mattermost/types/roles';
import type { GlobalState } from '@mattermost/types/store';
export type PermissionsOptions = {
channel?: string;
team?: string;
permission: string;
};
export declare function getRoles(state: GlobalState): {
[x: string]: Role;
};
export declare const getMySystemRoles: (state: GlobalState) => Set<string>;
export declare const getMySystemPermissions: (state: GlobalState) => Set<string>;
export declare function haveISystemPermission(state: GlobalState, options: PermissionsOptions): boolean;
export declare function getPermissionsForRoles(allRoles: Record<string, Role>, roleSet: Set<string>): Set<string>;