salix/db/versions/10836-limeCordyline/30-permissions.sql

37 lines
1.4 KiB
MySQL
Raw Normal View History

2024-01-29 08:12:29 +00:00
-- flight
CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `vn2008`.`flight` AS
SELECT 1;
GRANT SELECT, INSERT, UPDATE ON TABLE vn2008.flight TO `logistic`;
GRANT SELECT, INSERT, UPDATE ON TABLE vn.flight TO `logistic`;
-- integra2_province
CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `vn2008`.`integra2_province` AS
SELECT 1;
GRANT SELECT ON TABLE vn2008.integra2_province TO `employee`;
GRANT SELECT ON TABLE vn.integra2Province TO `employee`;
-- link
CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `vn2008`.`link` AS
SELECT 1;
GRANT SELECT ON TABLE vn2008.link TO `administrative`;
GRANT SELECT ON TABLE vn.link TO `administrative`;
GRANT SELECT ON TABLE vn2008.link TO `hr`;
GRANT SELECT ON TABLE vn.link TO `hr`;
-- warehouse_pickup
CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `vn2008`.`warehouse_pickup` AS
SELECT 1;
GRANT SELECT ON TABLE vn2008.warehouse_pickup TO `logistic`;
GRANT SELECT ON TABLE vn.warehousePickup TO `logistic`;
GRANT SELECT ON TABLE vn2008.warehouse_pickup TO `claimManager`;
GRANT SELECT ON TABLE vn.warehousePickup TO `claimManager`;
GRANT SELECT ON TABLE vn2008.warehouse_pickup TO `employee`;
GRANT SELECT ON TABLE vn.warehousePickup TO `employee`;
GRANT SELECT ON TABLE vn2008.warehouse_pickup TO `deliveryAssistant`;
GRANT SELECT ON TABLE vn.warehousePickup TO `deliveryAssistant`;