--POS_OPERATER ROLA
--PROMPT Granting Object Privileges
GRANT SELECT ON &1.HIBERNATE_SEQUENCE TO POS_OPERATER;
GRANT SELECT ON &1.M_POS_OMAN_GRUPE_ARTIKALA TO POS_OPERATER;
GRANT SELECT ON &1.M_POS_OMAN_GRUPE_ARTIKALA_VEZA TO POS_OPERATER;
GRANT SELECT ON &1.M_POS_GRUPE_KASA TO POS_OPERATER;
GRANT INSERT, SELECT, UPDATE ON &1.M_POS_PID TO POS_OPERATER;
GRANT INSERT, SELECT, UPDATE ON &1.M_POS_ARTIKLI TO POS_OPERATER;
GRANT INSERT, SELECT, UPDATE ON &1.M_POS_POREZNI_DOGADJAJ TO POS_OPERATER;
GRANT INSERT, SELECT, UPDATE ON &1.M_POS_PRINT_PARAMETRI TO POS_OPERATER;
GRANT SELECT,INSERT, UPDATE, DELETE ON &1.M_POS_MENU_FUNKCIJE TO POS_OPERATER;
GRANT INSERT, SELECT, UPDATE ON &1.M_POS_CJENICI TO POS_OPERATER;
GRANT INSERT, SELECT, UPDATE ON &1.M_POS_KUPCI TO POS_OPERATER;
GRANT INSERT, SELECT, UPDATE ON &1.M_POS_OMAN_LOZINKE TO POS_OPERATER;
GRANT INSERT, SELECT, UPDATE ON &1.T_POS_RACUNI_BROJAC TO POS_OPERATER;
GRANT INSERT, SELECT, UPDATE ON &1.M_POS_KONOBARI_LOZINKE TO POS_OPERATER;
GRANT INSERT, SELECT, UPDATE ON &1.M_POS_VRSTE_NAPLATE TO POS_OPERATER;
GRANT INSERT, SELECT, UPDATE,DELETE ON &1.M_POS_MENU_ARTIKAL TO POS_OPERATER;
GRANT INSERT, SELECT, UPDATE ON &1.M_POS_PROTEL_POREZ TO POS_OPERATER;
GRANT INSERT, SELECT, UPDATE ON &1.M_POS_CJENICI_VN TO POS_OPERATER;
GRANT INSERT, SELECT, UPDATE ON &1.M_POS_ARTIKLI_CJENIKA TO POS_OPERATER;
GRANT INSERT, SELECT, UPDATE ON &1.M_POS_KASE TO POS_OPERATER;
GRANT DELETE, INSERT, SELECT, UPDATE ON &1.T_POS_DETALJI_NAPLATE TO POS_OPERATER;
GRANT SELECT,INSERT, UPDATE ON &1.M_POS_KONOBARI TO POS_OPERATER;
GRANT INSERT, SELECT, UPDATE ON &1.M_POS_POREZNA_ISPORUKA TO POS_OPERATER;
GRANT SELECT,INSERT, UPDATE, DELETE ON &1.M_POS_MENU_SLOJ TO POS_OPERATER;
GRANT SELECT,INSERT, UPDATE, DELETE ON &1.M_POS_MENU_ITEM TO POS_OPERATER;
GRANT INSERT, SELECT, UPDATE ON &1.M_POS_VNS TO POS_OPERATER;
GRANT INSERT, SELECT, UPDATE ON &1.M_POS_CHRON_JOB TO POS_OPERATER;
GRANT INSERT, SELECT, UPDATE ON &1.M_POS_POREZNE_GRUPE TO POS_OPERATER;
GRANT INSERT, SELECT, UPDATE ON &1.M_POS_GRUPE_STAVAKA TO POS_OPERATER;
GRANT INSERT, SELECT, UPDATE ON &1.M_POS_MJESTA_TROSKA TO POS_OPERATER;
GRANT DELETE, INSERT, SELECT, UPDATE ON &1.T_POS_STAVKE TO POS_OPERATER;
GRANT SELECT ON &1.M_POS_OMAN_SCANCODEAKCIJE TO POS_OPERATER;
GRANT INSERT, SELECT, UPDATE ON &1.T_POS_RACUNI TO POS_OPERATER;
GRANT INSERT, SELECT, UPDATE ON &1.T_POS_PORUKE TO POS_OPERATER;
GRANT INSERT, SELECT, UPDATE ON &1.T_POS_NARUDZBE_BROJAC TO POS_OPERATER;
GRANT INSERT, SELECT, UPDATE ON &1.M_POS_PARAMETAR TO POS_OPERATER;
GRANT SELECT ON &1.M_POS_AKCIJE_KONOBARA TO POS_OPERATER;
GRANT INSERT, SELECT, UPDATE ON &1.M_POS_CJENICI_KONOBARA TO POS_OPERATER;
GRANT DELETE, INSERT, SELECT, UPDATE ON &1.T_POS_NAPLATE_RACUNA TO POS_OPERATER;
GRANT INSERT, SELECT, UPDATE ON &1.L_POS_RACUNI_FISK TO POS_OPERATER;
GRANT INSERT, SELECT, UPDATE ON &1.L_POS_LOG TO POS_OPERATER;
GRANT SELECT, UPDATE ON &1.M_POS_KASA_PARAMETRI TO POS_OPERATER;
GRANT SELECT, UPDATE ON &1.M_POS_KOMPONENTE_STOLA TO POS_OPERATER;
GRANT SELECT,INSERT,DELETE, UPDATE ON &1.L_POS_LOG_PRINT TO POS_OPERATER;
GRANT SELECT,INSERT,DELETE, UPDATE ON &1.T_POS_INTERNET_TICKETI TO POS_OPERATER;
GRANT SELECT,INSERT,DELETE, UPDATE ON &1.M_POS_SLIJEDOVI TO POS_OPERATER;



--POS_MANAGER ROLA
--PROMPT Granting Object Privileges
GRANT SELECT ON &1.HIBERNATE_SEQUENCE TO POS_MANAGER;
GRANT DELETE, INSERT, SELECT, UPDATE ON &1.M_POS_OMAN_GRUPE_ARTIKALA TO POS_MANAGER;
GRANT DELETE, INSERT, SELECT, UPDATE ON &1.M_POS_OMAN_GRUPE_ARTIKALA_VEZA TO POS_MANAGER;
GRANT DELETE, INSERT, SELECT, UPDATE ON &1.M_POS_GRUPE_KASA TO POS_MANAGER;
GRANT DELETE, INSERT, SELECT, UPDATE ON &1.M_POS_PID TO POS_MANAGER;
GRANT DELETE, INSERT, SELECT, UPDATE ON &1.M_POS_ARTIKLI TO POS_MANAGER;
GRANT DELETE, INSERT, SELECT, UPDATE ON &1.M_POS_POREZNI_DOGADJAJ TO POS_MANAGER;
GRANT DELETE, INSERT, SELECT, UPDATE ON &1.M_POS_PRINT_PARAMETRI TO POS_MANAGER;
GRANT DELETE, INSERT, SELECT, UPDATE ON &1.M_POS_VRSTE_NAPLATE TO POS_MANAGER;
GRANT DELETE, INSERT, SELECT, UPDATE ON &1.M_POS_MENU_ARTIKAL TO POS_MANAGER;
GRANT DELETE, INSERT, SELECT, UPDATE ON &1.M_POS_PROTEL_POREZ TO POS_MANAGER;
GRANT DELETE, INSERT, SELECT, UPDATE ON &1.M_POS_MENU_SLOJ TO POS_MANAGER;
GRANT DELETE, INSERT, SELECT, UPDATE ON &1.M_POS_CJENICI_VN TO POS_MANAGER;
GRANT DELETE, INSERT, SELECT, UPDATE ON &1.M_POS_ARTIKLI_CJENIKA TO POS_MANAGER;
GRANT DELETE, INSERT, SELECT, UPDATE ON &1.M_POS_KASE TO POS_MANAGER;
GRANT DELETE, INSERT, SELECT, UPDATE ON &1.T_POS_DETALJI_NAPLATE TO POS_MANAGER;
GRANT DELETE, INSERT, SELECT, UPDATE ON &1.M_POS_KONOBARI TO POS_MANAGER;
GRANT DELETE, INSERT, SELECT, UPDATE ON &1.M_POS_POREZNA_ISPORUKA TO POS_MANAGER;
GRANT DELETE, INSERT, SELECT, UPDATE ON &1.T_POS_NARUDZBE_BROJAC TO POS_MANAGER;
GRANT DELETE, INSERT, SELECT, UPDATE ON &1.M_POS_VNS TO POS_MANAGER;
GRANT DELETE, INSERT, SELECT, UPDATE ON &1.M_POS_PARAMETAR TO POS_MANAGER;
GRANT DELETE, INSERT, SELECT, UPDATE ON &1.M_POS_MENU_ITEM TO POS_MANAGER;
GRANT DELETE, INSERT, SELECT, UPDATE ON &1.M_POS_MJESTA_TROSKA TO POS_MANAGER;
GRANT DELETE, INSERT, SELECT, UPDATE ON &1.T_POS_STAVKE TO POS_MANAGER;
GRANT DELETE, INSERT, SELECT, UPDATE ON &1.M_POS_OMAN_SCANCODEAKCIJE TO POS_MANAGER;
GRANT DELETE, INSERT, SELECT, UPDATE ON &1.T_POS_RACUNI TO POS_MANAGER;
GRANT DELETE, INSERT, SELECT, UPDATE ON &1.T_POS_PORUKE TO POS_MANAGER;
GRANT DELETE, INSERT, SELECT, UPDATE ON &1.M_POS_CHRON_JOB TO POS_MANAGER;
GRANT DELETE, INSERT, SELECT, UPDATE ON &1.M_POS_POREZNE_GRUPE TO POS_MANAGER;
GRANT DELETE, INSERT, SELECT, UPDATE ON &1.M_POS_GRUPE_STAVAKA TO POS_MANAGER;
GRANT DELETE, INSERT, SELECT, UPDATE ON &1.M_POS_CJENICI TO POS_MANAGER;
GRANT DELETE, INSERT, SELECT, UPDATE ON &1.M_POS_AKCIJE_KONOBARA TO POS_MANAGER;
GRANT DELETE, INSERT, SELECT, UPDATE ON &1.M_POS_CJENICI_KONOBARA TO POS_MANAGER;
GRANT DELETE, INSERT, SELECT, UPDATE ON &1.T_POS_NAPLATE_RACUNA TO POS_MANAGER;
GRANT DELETE, INSERT, SELECT, UPDATE ON &1.M_POS_KUPCI TO POS_MANAGER;
GRANT DELETE, INSERT, SELECT, UPDATE ON &1.M_POS_OMAN_LOZINKE TO POS_MANAGER;
GRANT DELETE, INSERT, SELECT, UPDATE ON &1.T_POS_RACUNI_BROJAC TO POS_MANAGER;
GRANT DELETE, INSERT, SELECT, UPDATE ON &1.M_POS_KONOBARI_LOZINKE TO POS_MANAGER;
GRANT DELETE, INSERT, SELECT, UPDATE ON &1.M_POS_MENU_FUNKCIJE TO POS_MANAGER;
GRANT DELETE, INSERT, SELECT, UPDATE ON &1.L_POS_RACUNI_FISK TO POS_MANAGER;
GRANT DELETE, INSERT, SELECT, UPDATE ON &1.L_POS_LOG TO POS_MANAGER;
GRANT DELETE, INSERT, SELECT, UPDATE ON &1.M_POS_KASA_PARAMETRI TO POS_MANAGER;
GRANT DELETE, INSERT, SELECT, UPDATE ON &1.M_POS_KOMPONENTE_STOLA TO POS_MANAGER;
GRANT SELECT,INSERT,DELETE, UPDATE ON &1.L_POS_LOG_PRINT TO POS_MANAGER;
GRANT SELECT,INSERT,DELETE, UPDATE ON &1.T_POS_INTERNET_TICKETI TO POS_MANAGER;
GRANT SELECT,INSERT,DELETE, UPDATE ON &1.M_POS_SLIJEDOVI TO POS_MANAGER;

--POS INST rola
GRANT CREATE ANY TABLE TO POS_INST;
GRANT CREATE ANY INDEX TO POS_INST;
GRANT GRANT ANY object privilege TO POS_INST;
GRANT DROP ANY TABLE TO POS_INST;
GRANT ALTER,SELECT, INSERT, UPDATE,DELETE ON &1.M_POS_OMAN_GRUPE_ARTIKALA TO POS_INST;
GRANT ALTER,SELECT, INSERT, UPDATE,DELETE ON &1.M_POS_OMAN_GRUPE_ARTIKALA_VEZA TO POS_INST;
GRANT ALTER,SELECT, INSERT, UPDATE,DELETE ON &1.M_POS_GRUPE_KASA TO POS_INST;
GRANT ALTER,SELECT, INSERT, UPDATE,DELETE ON &1.M_POS_PID TO POS_INST;
GRANT ALTER,SELECT, INSERT, UPDATE,DELETE ON &1.M_POS_ARTIKLI TO POS_INST;
GRANT ALTER,SELECT, INSERT, UPDATE,DELETE ON &1.M_POS_POREZNI_DOGADJAJ TO POS_INST;
GRANT ALTER,SELECT, INSERT, UPDATE,DELETE ON &1.M_POS_PRINT_PARAMETRI TO POS_INST;
GRANT ALTER,SELECT, INSERT, UPDATE,DELETE ON &1.M_POS_MENU_FUNKCIJE TO POS_INST;
GRANT ALTER,SELECT, INSERT, UPDATE,DELETE ON &1.M_POS_CJENICI TO POS_INST;
GRANT ALTER,SELECT, INSERT, UPDATE,DELETE ON &1.M_POS_KUPCI TO POS_INST;
GRANT ALTER,SELECT, INSERT, UPDATE,DELETE ON &1.M_POS_OMAN_LOZINKE TO POS_INST;
GRANT ALTER,SELECT, INSERT, UPDATE,DELETE ON &1.T_POS_RACUNI_BROJAC TO POS_INST;
GRANT ALTER,SELECT, INSERT, UPDATE,DELETE ON &1.M_POS_KONOBARI_LOZINKE TO POS_INST;
GRANT ALTER,SELECT, INSERT, UPDATE,DELETE ON &1.M_POS_VRSTE_NAPLATE TO POS_INST;
GRANT ALTER,SELECT, INSERT, UPDATE,DELETE ON &1.M_POS_MENU_ARTIKAL TO POS_INST;
GRANT ALTER,SELECT, INSERT, UPDATE,DELETE ON &1.M_POS_PROTEL_POREZ TO POS_INST;
GRANT ALTER,SELECT, INSERT, UPDATE,DELETE ON &1.M_POS_CJENICI_VN TO POS_INST;
GRANT ALTER,SELECT, INSERT, UPDATE,DELETE ON &1.M_POS_ARTIKLI_CJENIKA TO POS_INST;
GRANT ALTER,SELECT, INSERT, UPDATE,DELETE ON &1.M_POS_KASE TO POS_INST;
GRANT ALTER,SELECT, INSERT, UPDATE,DELETE ON &1.T_POS_DETALJI_NAPLATE TO POS_INST;
GRANT ALTER,SELECT, INSERT, UPDATE,DELETE ON &1.M_POS_KONOBARI TO POS_INST;
GRANT ALTER,SELECT, INSERT, UPDATE,DELETE ON &1.M_POS_POREZNA_ISPORUKA TO POS_INST;
GRANT ALTER,SELECT, INSERT, UPDATE,DELETE ON &1.M_POS_MENU_SLOJ TO POS_INST;
GRANT ALTER,SELECT, INSERT, UPDATE,DELETE ON &1.M_POS_MENU_ITEM TO POS_INST;
GRANT ALTER,SELECT, INSERT, UPDATE,DELETE ON &1.M_POS_VNS TO POS_INST;
GRANT ALTER,SELECT, INSERT, UPDATE,DELETE ON &1.M_POS_CHRON_JOB TO POS_INST;
GRANT ALTER,SELECT, INSERT, UPDATE,DELETE ON &1.M_POS_POREZNE_GRUPE TO POS_INST;
GRANT ALTER,SELECT, INSERT, UPDATE,DELETE ON &1.M_POS_GRUPE_STAVAKA TO POS_INST;
GRANT ALTER,SELECT, INSERT, UPDATE,DELETE ON &1.M_POS_MJESTA_TROSKA TO POS_INST;
GRANT ALTER,SELECT, INSERT, UPDATE,DELETE ON &1.T_POS_STAVKE TO POS_INST;
GRANT ALTER,SELECT, INSERT, UPDATE,DELETE ON &1.M_POS_OMAN_SCANCODEAKCIJE TO POS_INST;
GRANT ALTER,SELECT, INSERT, UPDATE,DELETE ON &1.T_POS_RACUNI TO POS_INST;
GRANT ALTER,SELECT, INSERT, UPDATE,DELETE ON &1.T_POS_PORUKE TO POS_INST;
GRANT ALTER,SELECT, INSERT, UPDATE,DELETE ON &1.T_POS_NARUDZBE_BROJAC TO POS_INST;
GRANT ALTER,SELECT, INSERT, UPDATE,DELETE ON &1.M_POS_PARAMETAR TO POS_INST;
GRANT ALTER,SELECT, INSERT, UPDATE,DELETE ON &1.M_POS_AKCIJE_KONOBARA TO POS_INST;
GRANT ALTER,SELECT, INSERT, UPDATE,DELETE ON &1.M_POS_CJENICI_KONOBARA TO POS_INST;
GRANT ALTER,SELECT, INSERT, UPDATE,DELETE ON &1.T_POS_NAPLATE_RACUNA TO POS_INST;
GRANT ALTER,SELECT, INSERT, UPDATE,DELETE ON &1.L_POS_RACUNI_FISK TO POS_INST;
GRANT ALTER,DELETE, INSERT, SELECT, UPDATE ON &1.L_POS_LOG TO POS_INST;
GRANT ALTER,DELETE, INSERT, SELECT, UPDATE ON &1.M_POS_KASA_PARAMETRI TO POS_INST;
GRANT ALTER,DELETE, INSERT, SELECT, UPDATE ON &1.M_POS_KOMPONENTE_STOLA TO POS_INST;
GRANT ALTER,SELECT,INSERT,DELETE, UPDATE ON &1.L_POS_LOG_PRINT TO POS_INST;
GRANT ALTER,SELECT,INSERT,DELETE, UPDATE ON &1.T_POS_INTERNET_TICKETI TO POS_INST;
GRANT ALTER,SELECT,INSERT,DELETE, UPDATE ON &1.M_POS_SLIJEDOVI TO POS_INST;


--ovo javlja gresku
grant select on v_$session to POS_OPERATER;