page-grant.ts 643 B

1234567891011121314151617181920
  1. import { PageGrant, IPageGrantData } from './page';
  2. export type IDataApplicableGroup = {
  3. applicableGroups?: {_id: string, name: string}[] // TODO: Typescriptize model
  4. }
  5. export type IDataApplicableGrant = null | IDataApplicableGroup;
  6. export type IRecordApplicableGrant = Record<PageGrant, IDataApplicableGrant>
  7. export type IResApplicableGrant = {
  8. data?: IRecordApplicableGrant
  9. }
  10. export type IResIsGrantNormalizedGrantData = {
  11. isForbidden: boolean,
  12. currentPageGrant: IPageGrantData,
  13. parentPageGrant?: IPageGrantData
  14. }
  15. export type IResIsGrantNormalized = {
  16. isGrantNormalized: boolean,
  17. grantData: IResIsGrantNormalizedGrantData
  18. };