added vehicle core read permissions
This commit is contained in:
parent
fcffc25a5a
commit
06d53b6e89
|
@ -0,0 +1,8 @@
|
|||
-- This file should undo anything in `up.sql`
|
||||
DELETE
|
||||
FROM public.permissions
|
||||
WHERE permission LIKE 'modules.resource_management.vehicles.core.view';
|
||||
|
||||
DELETE
|
||||
FROM roles_permissions
|
||||
WHERE permission_id LIKE 'modules.resource_management.vehicles.core.view';
|
|
@ -0,0 +1,6 @@
|
|||
-- Your SQL goes here
|
||||
INSERT INTO permissions (permission, description, context, context_type)
|
||||
VALUES ('modules.resource_management.vehicles.core.view', 'Permission to see all vehicle data', true, 'vehicles');
|
||||
INSERT INTO roles_permissions (role_id, permission_id, role_permission_id)
|
||||
VALUES ('admin', 'modules.resource_management.vehicles.core.view', DEFAULT);
|
||||
|
|
@ -91,6 +91,7 @@ pub mod modules {
|
|||
pub const VIEW: &'static str = "modules.resource_management.view";
|
||||
pub mod vehicles{
|
||||
pub mod core{
|
||||
pub const VIEW: &'static str = "modules.resource_management.vehicles.core.view";
|
||||
pub const EDIT: &'static str = "modules.resource_management.vehicles.core.edit";
|
||||
pub const CREATE: &'static str = "modules.resource_management.vehicles.core.create";
|
||||
pub const DELETE: &'static str = "modules.resource_management.vehicles.core.delete";
|
||||
|
|
Loading…
Reference in New Issue