From: Roland Hieber Date: Sun, 27 Dec 2009 06:58:44 +0000 (+0100) Subject: db_user migration X-Git-Url: https://git.rohieb.name/iserv-mod-room-reservation.git/commitdiff_plain/35b2b9d62465708e68835641ba737cd8bdcc4b9c?hp=2c15897d86b6c1e280ef4a5673f1e75e18efbbf9 db_user migration --- diff --git a/inc/functions.inc b/inc/functions.inc index 741f8f7..ca915c2 100644 --- a/inc/functions.inc +++ b/inc/functions.inc @@ -31,6 +31,8 @@ require_once("db.inc"); require_once("user.inc"); require_once("sec/secure.inc"); +db_user("roomreservation"); + /** * @page errorcodes Error Codes * @{ diff --git a/inc/mod_roomReservationConfig.inc b/inc/mod_roomReservationConfig.inc index 7fe357a..6acc199 100644 --- a/inc/mod_roomReservationConfig.inc +++ b/inc/mod_roomReservationConfig.inc @@ -32,6 +32,8 @@ require_once("mod_room-reservation/functions.inc"); require_once("mod_room-reservation/mod_roomReservationTimeslice.inc"); require_once("mod_room-reservation/mod_roomReservationRoomsManager.inc"); +db_user("roomreservation"); + /** * Determines if a privilege has been assigned * @param $sPriv (string) Privilege to test diff --git a/inc/mod_roomReservationRoomsManager.inc b/inc/mod_roomReservationRoomsManager.inc index 4c90b79..2ceb1b9 100644 --- a/inc/mod_roomReservationRoomsManager.inc +++ b/inc/mod_roomReservationRoomsManager.inc @@ -31,6 +31,8 @@ require_once("mod_room-reservation/functions.inc"); require_once("mod_room-reservation/mod_roomReservationRoom.inc"); require_once("mod_room-reservation/mod_roomReservationConfig.inc"); +db_user("roomreservation"); + /** Simple class for creating, editing and deleting rooms */ class mod_roomReservationRoomsManager { /** (mod_roomReservationConfig) Reference to the configuration */ diff --git a/sql/mod_room-reservation.sql b/sql/mod_room-reservation.sql index b585798..c34f355 100644 --- a/sql/mod_room-reservation.sql +++ b/sql/mod_room-reservation.sql @@ -1,3 +1,5 @@ +CREATE USER roomreservation; + -- -- Table with rooms allowed for booking -- @@ -33,11 +35,15 @@ CREATE TABLE mod_roomreservation_bookings ( -- -- Permissions -- -GRANT SELECT, INSERT, UPDATE, DELETE ON mod_roomreservation_bookings TO webusr, - webadm; -GRANT SELECT, UPDATE ON mod_roomreservation_bookings_rrb_uid_seq TO webusr, - webadm; -GRANT SELECT ON mod_roomreservation_roomswhitelist TO webusr; +GRANT SELECT, INSERT, UPDATE, DELETE ON mod_roomreservation_bookings TO + roomreservation; +GRANT SELECT, UPDATE ON mod_roomreservation_bookings_rrb_uid_seq TO + roomreservation; GRANT SELECT, INSERT, UPDATE, DELETE ON mod_roomreservation_roomswhitelist TO - webadm; - + roomreservation; +GRANT INSERT, UPDATE ON log TO roomreservation; +GRANT SELECT, INSERT, UPDATE ON log_module TO roomreservation; +GRANT SELECT ON users TO roomreservation; +GRANT SELECT ON groups TO roomreservation; +GRANT SELECT ON rooms TO roomreservation; +GRANT SELECT, INSERT ON privileges_assign TO roomreservation;