base router and permissions
This commit is contained in:
parent
7883bb7d7f
commit
0684605093
11 changed files with 196 additions and 12 deletions
|
@ -1,27 +1,43 @@
|
|||
export type PermissionSection = "club" | "configuration" | "management";
|
||||
export type PermissionSection = "club" | "unit" | "configuration" | "management";
|
||||
|
||||
export type PermissionModule =
|
||||
// club
|
||||
| "member"
|
||||
| "calendar"
|
||||
| "newsletter"
|
||||
| "newsletter_config"
|
||||
| "protocol"
|
||||
| "query"
|
||||
| "listprint"
|
||||
// unit
|
||||
| "equipment"
|
||||
| "equipment_type"
|
||||
| "vehicle"
|
||||
| "vehicle_type"
|
||||
| "wearable"
|
||||
| "wearable_type"
|
||||
| "inspection"
|
||||
| "inspection_plan"
|
||||
| "respiratory_gear"
|
||||
| "respiratory_wearer"
|
||||
| "respiratory_mission"
|
||||
| "damage_report"
|
||||
// configuration
|
||||
| "qualification"
|
||||
| "award"
|
||||
| "executive_position"
|
||||
| "communication_type"
|
||||
| "membership_status"
|
||||
| "newsletter_config"
|
||||
| "salutation"
|
||||
| "calendar_type"
|
||||
| "user"
|
||||
| "role"
|
||||
| "webapi"
|
||||
| "query"
|
||||
| "query_store"
|
||||
| "template"
|
||||
| "template_usage"
|
||||
| "backup"
|
||||
// management
|
||||
| "user"
|
||||
| "role"
|
||||
| "webapi"
|
||||
| "setting";
|
||||
|
||||
export type PermissionType = "read" | "create" | "update" | "delete";
|
||||
|
@ -56,34 +72,64 @@ export type SectionsAndModulesObject = {
|
|||
}>;
|
||||
};
|
||||
|
||||
export const permissionSections: Array<PermissionSection> = ["club", "configuration", "management"];
|
||||
export const permissionSections: Array<PermissionSection> = ["club", "unit", "configuration", "management"];
|
||||
export const permissionModules: Array<PermissionModule> = [
|
||||
// club
|
||||
"member",
|
||||
"calendar",
|
||||
"newsletter",
|
||||
"newsletter_config",
|
||||
"protocol",
|
||||
"query",
|
||||
"listprint",
|
||||
// unit
|
||||
"equipment",
|
||||
"equipment_type",
|
||||
"vehicle",
|
||||
"vehicle_type",
|
||||
"wearable",
|
||||
"wearable_type",
|
||||
"inspection",
|
||||
"inspection_plan",
|
||||
"respiratory_gear",
|
||||
"respiratory_wearer",
|
||||
"respiratory_mission",
|
||||
"damage_report",
|
||||
// configuration
|
||||
"qualification",
|
||||
"award",
|
||||
"executive_position",
|
||||
"communication_type",
|
||||
"membership_status",
|
||||
"newsletter_config",
|
||||
"salutation",
|
||||
"calendar_type",
|
||||
"user",
|
||||
"role",
|
||||
"webapi",
|
||||
"query",
|
||||
"query_store",
|
||||
"template",
|
||||
"template_usage",
|
||||
"backup",
|
||||
// management
|
||||
"user",
|
||||
"role",
|
||||
"webapi",
|
||||
"setting",
|
||||
];
|
||||
export const permissionTypes: Array<PermissionType> = ["read", "create", "update", "delete"];
|
||||
export const sectionsAndModules: SectionsAndModulesObject = {
|
||||
club: ["member", "calendar", "newsletter", "protocol", "query", "listprint"],
|
||||
unit: [
|
||||
"equipment",
|
||||
"equipment_type",
|
||||
"vehicle",
|
||||
"vehicle_type",
|
||||
"wearable",
|
||||
"wearable_type",
|
||||
"inspection",
|
||||
"inspection_plan",
|
||||
"respiratory_gear",
|
||||
"respiratory_wearer",
|
||||
"respiratory_mission",
|
||||
"damage_report",
|
||||
],
|
||||
configuration: [
|
||||
"qualification",
|
||||
"award",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue