Feature: Added permissions for scheduler

This commit is contained in:
Keanu D?lle 2021-02-24 13:25:27 +01:00
parent c63f0d0fff
commit 081fd7333c
3 changed files with 40 additions and 0 deletions

View File

@ -0,0 +1,13 @@
-- This file should undo anything in `up.sql`
DELETE
FROM permissions
WHERE permission LIKE 'modules.scheduler.view' ESCAPE '#';
DELETE
FROM permissions
WHERE permission LIKE 'modules.scheduler.appointments.edit' ESCAPE '#';
DELETE
FROM permissions
WHERE permission LIKE 'modules.scheduler.appointments.view' ESCAPE '#';

View File

@ -0,0 +1,10 @@
-- Your SQL goes here
INSERT INTO permissions (permission, description)
VALUES ('modules.scheduler.view', 'Permission to see upcoming appointments & scheduler');
INSERT INTO permissions (permission, description)
VALUES ('modules.scheduler.appointments.view', 'Permission to see appointment for specified (context) entity');
INSERT INTO permissions (permission, description)
VALUES ('modules.scheduler.appointments.edit', 'Permission to modify appointment for specified (context) entity');

View File

@ -74,6 +74,16 @@ pub mod modules {
pub mod event_management {
pub const VIEW: &'static str = "modules.event_management.view";
}
pub mod resource_management{
pub mod vehicles{
pub mod core{
pub const EDIT: &'static str = "modules.resource_management.vehicles.core.edit";
}
pub mod list{
pub const VIEW: &'static str = "modules.resource_management.vehicles.list.view";
}
}
}
pub mod configuration {
pub mod fields {
pub mod communication_types {
@ -98,4 +108,11 @@ pub mod modules {
pub const SEND: &'static str = "modules.communicator.email.send";
}
}
pub mod scheduler{
pub const VIEW: &'static str = "modules.scheduler.view";
pub mod appointments{
pub const VIEW: &'static str = "modules.scheduler.appointments.view";
pub const EDIT: &'static str = "modules.scheduler.appointments.edit";
}
}
}