| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- import {Store} from "vuex";
- interface ItemsMenu extends Array<ItemMenu> {}
- interface ItemMenu {
- icon: string,
- title: string,
- to?: string,
- old?: boolean,
- children?: ItemsMenu
- }
- interface AbilitiesType {
- action: 'display' | 'read' | 'manage',
- subject: string,
- /** an array of fields to which user has (or not) access */
- fields?: string[]
- /** an object of conditions which restricts the rule scope */
- conditions?: any
- /** indicates whether rule allows or forbids something */
- inverted?: boolean
- /** message which explains why rule is forbidden */
- reason?: string
- }
- interface accessState {
- bearer: string,
- accessId: number,
- roles: Array<string>,
- abilities: Array<AbilitiesType>,
- isAdmin: boolean,
- isAdministratifManager: boolean,
- isPedagogicManager: boolean,
- isFinancialManager: boolean,
- isCaMember: boolean,
- isStudent: boolean,
- isTeacher: boolean,
- isMember: boolean,
- isOther: boolean
- }
- interface AccessStore extends Store<{profile:{access:accessState}}> {}
- interface organizationState {
- name: string,
- product: string,
- modules: Array<string>,
- hasChildren: boolean,
- }
- interface OrganizationStore extends Store<{profile:{organization:organizationState}}> {}
- interface AnyJson extends Record<string, any> {}
- interface AnyStore extends Store<any> {}
|