Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x | import { SubjectsEnum, type Ability } from '../../types';
import { CustomReportsActions } from './actions';
import { viewCustomReportSubject, type ViewCustomReportSubject } from './subjects';
export const canViewCustomReports = (ability: Ability) =>
ability.can(CustomReportsActions.view, SubjectsEnum.CustomReport);
export const canViewCustomReportsUnfilteredData = (ability: Ability) =>
ability.can(CustomReportsActions.view_unfiltered_data, SubjectsEnum.CustomReport);
export const canViewThisCustomReport = (ability: Ability, subject: ViewCustomReportSubject) =>
ability.can(CustomReportsActions.view, viewCustomReportSubject(subject));
export const canModifyCustomReports = (ability: Ability) =>
ability.can(CustomReportsActions.modify, SubjectsEnum.CustomReport);
export const canCreateCustomReports = (ability: Ability) =>
ability.can(CustomReportsActions.create, SubjectsEnum.CustomReport);
export const canDeleteCustomReports = (ability: Ability) =>
ability.can(CustomReportsActions.delete, SubjectsEnum.CustomReport);
|