summaryrefslogtreecommitdiff
path: root/sql/modules/Roles.sql
blob: c3ad4650e4b85d29918bbbbfbb275a103337ea48 (plain)
  1. -- Contacts
  2. CREATE ROLE lsmb_<?lsmb dbname ?>__read_contact
  3. WITH INHERIT NOLOGIN;
  4. GRANT SELECT ON entity TO lsmb_<?lsmb dbname ?>__create_contact;
  5. GRANT SELECT ON company TO lsmb_<?lsmb dbname ?>__create_contact;
  6. GRANT SELECT ON location TO lsmb_<?lsmb dbname ?>__create_contact;
  7. GRANT SELECT ON person TO lsmb_<?lsmb dbname ?>__create_contact;
  8. GRANT SELECT ON entity_credit_account TO lsmb_<?lsmb dbname ?>__create_contact;
  9. GRANT SELECT ON company_to_contact TO lsmb_<?lsmb dbname ?>__create_contact;
  10. GRANT SELECT ON company_to_entity TO lsmb_<?lsmb dbname ?>__create_contact;
  11. GRANT SELECT ON company_to_location TO lsmb_<?lsmb dbname ?>__create_contact;
  12. GRANT SELECT ON customertax TO lsmb_<?lsmb dbname ?>__create_contact;
  13. GRANT SELECT ON employee TO lsmb_<?lsmb dbname ?>__create_contact;
  14. GRANT SELECT ON customer TO lsmb_<?lsmb dbname ?>__create_contact;
  15. GRANT SELECT ON contact_class TO lsmb_<?lsmb dbname ?>__create_contact;
  16. GRANT SELECT ON entity_class TO lsmb_<?lsmb dbname ?>__create_contact;
  17. GRANT SELECT ON entity_bank_account TO lsmb_<?lsmb dbname ?>__create_contact;
  18. GRANT SELECT ON entity_note TO lsmb_<?lsmb dbname ?>__create_contact;
  19. GRANT SELECT ON entity_class_to_entity TO lsmb_<?lsmb dbname ?>__create_contact;
  20. GRANT SELECT ON entity_other_name TO lsmb_<?lsmb dbname ?>__create_contact;
  21. GRANT SELECT ON location_class TO lsmb_<?lsmb dbname ?>__create_contact;
  22. GRANT SELECT ON person_to_company TO lsmb_<?lsmb dbname ?>__create_contact;
  23. GRANT SELECT ON person_to_contact TO lsmb_<?lsmb dbname ?>__create_contact;
  24. GRANT SELECT ON person_to_contact TO lsmb_<?lsmb dbname ?>__create_contact;
  25. GRANT SELECT ON person_to_location TO lsmb_<?lsmb dbname ?>__create_contact;
  26. GRANT SELECT ON person_to_location TO lsmb_<?lsmb dbname ?>__create_contact;
  27. GRANT SELECT ON vendortax TO lsmb_<?lsmb dbname ?>__create_contact;
  28. CREATE ROLE lsmb_<?lsmb dbname ?>__create_contact
  29. WITH INHERIT NOLOGIN
  30. IN ROLE lsmb_<?lsmb dbname ?>__read_contact;
  31. GRANT INSERT ON entity TO lsmb_<?lsmb dbname ?>__create_contact;
  32. GRANT INSERT ON company TO lsmb_<?lsmb dbname ?>__create_contact;
  33. GRANT INSERT ON location TO lsmb_<?lsmb dbname ?>__create_contact;
  34. GRANT INSERT ON person TO lsmb_<?lsmb dbname ?>__create_contact;
  35. GRANT INSERT ON entity_credit_account TO lsmb_<?lsmb dbname ?>__create_contact;
  36. GRANT INSERT ON company_to_contact TO lsmb_<?lsmb dbname ?>__create_contact;
  37. GRANT INSERT ON company_to_entity TO lsmb_<?lsmb dbname ?>__create_contact;
  38. GRANT INSERT ON company_to_location TO lsmb_<?lsmb dbname ?>__create_contact;
  39. GRANT INSERT ON customertax TO lsmb_<?lsmb dbname ?>__create_contact;
  40. GRANT INSERT ON employee TO lsmb_<?lsmb dbname ?>__create_contact;
  41. GRANT INSERT ON customer TO lsmb_<?lsmb dbname ?>__create_contact;
  42. GRANT INSERT ON entity_bank_account TO lsmb_<?lsmb dbname ?>__create_contact;
  43. GRANT INSERT ON entity_note TO lsmb_<?lsmb dbname ?>__create_contact;
  44. GRANT INSERT ON entity_class_to_entity TO lsmb_<?lsmb dbname ?>__create_contact;
  45. GRANT INSERT ON entity_other_name TO lsmb_<?lsmb dbname ?>__create_contact;
  46. GRANT INSERT ON person_to_company TO lsmb_<?lsmb dbname ?>__create_contact;
  47. GRANT INSERT ON person_to_contact TO lsmb_<?lsmb dbname ?>__create_contact;
  48. GRANT INSERT ON person_to_contact TO lsmb_<?lsmb dbname ?>__create_contact;
  49. GRANT INSERT ON person_to_location TO lsmb_<?lsmb dbname ?>__create_contact;
  50. GRANT INSERT ON person_to_location TO lsmb_<?lsmb dbname ?>__create_contact;
  51. GRANT INSERT ON vendortax TO lsmb_<?lsmb dbname ?>__create_contact;
  52. CREATE ROLE lsmb_<?lsmb dbname ?>__edit_contact
  53. WITH INHERIT NOLOGIN
  54. IN ROLE lsmb_<?lsmb dbname ?>__read_contact;
  55. GRANT UPDATE ON entity TO lsmb_<?lsmb dbname ?>__create_contact;
  56. GRANT UPDATE ON company TO lsmb_<?lsmb dbname ?>__create_contact;
  57. GRANT UPDATE ON location TO lsmb_<?lsmb dbname ?>__create_contact;
  58. GRANT UPDATE ON person TO lsmb_<?lsmb dbname ?>__create_contact;
  59. GRANT UPDATE ON entity_credit_account TO lsmb_<?lsmb dbname ?>__create_contact;
  60. GRANT UPDATE ON company_to_contact TO lsmb_<?lsmb dbname ?>__create_contact;
  61. GRANT UPDATE ON company_to_entity TO lsmb_<?lsmb dbname ?>__create_contact;
  62. GRANT UPDATE ON company_to_location TO lsmb_<?lsmb dbname ?>__create_contact;
  63. GRANT UPDATE ON customertax TO lsmb_<?lsmb dbname ?>__create_contact;
  64. GRANT UPDATE ON employee TO lsmb_<?lsmb dbname ?>__create_contact;
  65. GRANT UPDATE ON customer TO lsmb_<?lsmb dbname ?>__create_contact;
  66. GRANT UPDATE ON entity_bank_account TO lsmb_<?lsmb dbname ?>__create_contact;
  67. GRANT UPDATE ON entity_note TO lsmb_<?lsmb dbname ?>__create_contact;
  68. GRANT UPDATE ON entity_class_to_entity TO lsmb_<?lsmb dbname ?>__create_contact;
  69. GRANT UPDATE ON entity_other_name TO lsmb_<?lsmb dbname ?>__create_contact;
  70. GRANT UPDATE ON person_to_company TO lsmb_<?lsmb dbname ?>__create_contact;
  71. GRANT UPDATE ON person_to_contact TO lsmb_<?lsmb dbname ?>__create_contact;
  72. GRANT UPDATE ON person_to_contact TO lsmb_<?lsmb dbname ?>__create_contact;
  73. GRANT UPDATE ON person_to_location TO lsmb_<?lsmb dbname ?>__create_contact;
  74. GRANT UPDATE ON person_to_location TO lsmb_<?lsmb dbname ?>__create_contact;
  75. GRANT DELETE, INSERT ON vendortax TO lsmb_<?lsmb dbname ?>__create_contact;
  76. CREATE ROLE lsmb_<?lsmb dbname ?>__contact_all_rights
  77. WITH INHERIT NOLOGIN
  78. in role lsmb_<?lsmb dbname ?>__create_contact,
  79. lsmb_<?lsmb dbname ?>__edit_contact,
  80. lsmb_<?lsmb dbname ?>__read_contact;
  81. -- Batches and VOuchers
  82. CREATE ROLE lsmb_<?lsmb dbname ?>__create_batch
  83. WITH INHERIT NOLOGIN;
  84. GRANT INSERT ON batch TO lsmb_<?lsmb dbname ?>__create_batch;
  85. GRANT SELECT ON batch_class TO lsmb_<?lsmb dbname ?>__create_batch;
  86. GRANT INSERT ON voucher TO lsmb_<?lsmb dbname ?>__create_batch;
  87. CREATE ROLE lsmb_<?lsmb dbname ?>__post_batches
  88. WITH INHERIT NOLOGIN;
  89. GRANT UPDATE ON ar TO lsmb_<?lsmb dbname ?>__post_batches;
  90. GRANT UPDATE ON ap TO lsmb_<?lsmb dbname ?>__post_batches;
  91. GRANT UPDATE ON acc_trans TO lsmb_<?lsmb dbname ?>__post_batches;
  92. GRANT UPDATE ON batch TO lsmb_<?lsmb dbname ?>__post_batches;
  93. GRANT UPDATE ON gl TO lsmb_<?lsmb dbname ?>__post_batches;
  94. -- AR
  95. CREATE ROLE lsmb_<?lsmb dbname ?>__create_ar_transaction
  96. WITH INHERIT NOLOGIN
  97. IN ROLE lsmb_<?lsmb dbname ?>__read_contact;
  98. GRANT INSERT ON ar TO lsmb_<?lsmb dbname ?>__create_ar_transaction;
  99. GRANT INSERT ON acc_trans TO lsmb_<?lsmb dbname ?>__create_ar_transaction;
  100. CREATE ROLE lsmb_<?lsmb dbname ?>__create_ar_transaction_voucher
  101. WITH INHERIT NOLOGIN
  102. IN ROLE lsmb_<?lsmb dbname ?>__read_contact,
  103. lsmb_<?lsmb dbname ?>__create_batch;
  104. GRANT INSERT ON ar TO lsmb_<?lsmb dbname ?>__create_ar_transaction_voucher;
  105. GRANT INSERT ON acc_trans TO lsmb_<?lsmb dbname ?>__create_ar_transaction_voucher;
  106. CREATE ROLE lsmb_<?lsmb dbname ?>__create_ar_invoice
  107. WITH INHERIT NOLOGIN
  108. IN ROLE lsmb_<?lsmb dbname ?>__read_contact,
  109. lsmb_<?lsmb dbname ?>__create_ar_transaction;
  110. GRANT INSERT ON invoice TO lsmb_<?lsmb dbname ?>__create_ar_invoice;
  111. GRANT INSERT ON inventory TO lsmb_<?lsmb dbname ?>__create_ar_invoice;
  112. CREATE ROLE lsmb_<?lsmb dbname ?>__create_ar_invoice_voucher
  113. WITH INHERIT NOLOGIN
  114. IN ROLE lsmb_<?lsmb dbname ?>__read_contact,
  115. lsmb_<?lsmb dbname ?>__create_batch,
  116. lsmb_<?lsmb dbname ?>__create_ar_transaction_voucher;
  117. GRANT INSERT ON invoice TO lsmb_<?lsmb dbname ?>__create_ar_invoice_voucher;
  118. GRANT INSERT ON inventory TO lsmb_<?lsmb dbname ?>__create_ar_invoice_voucher;
  119. CREATE ROLE lsmb_<?lsmb dbname ?>__list_ar_transactions
  120. WITH INHERIT NOLOGIN
  121. IN ROLE lsmb_<?lsmb dbname ?>__read_contact;
  122. GRANT SELECT ON ar TO lsmb_<?lsmb dbname ?>__list_ar_transactions;
  123. GRANT SELECT ON acc_trans TO lsmb_<?lsmb dbname ?>__list_ar_transactions;
  124. GRANT SELECT ON invoice TO lsmb_<?lsmb dbname ?>__list_ar_transactions
  125. GRANT SELECT ON inventory TO lsmb_<?lsmb dbname ?>__list_ar_transactions
  126. CREATE ROLE lsmb_<?lsmb dbname ?>__ar_all_vouchers
  127. WITH INHERIT NOLOGIN
  128. IN ROLE lsmb_<?lsmb dbname ?>__create_ar_transaction_voucher,
  129. lsmb_<?lsmb dbname ?>__create_ar_invoice_voucher;
  130. CREATE ROLE lsmb_<?lsmb dbname ?>__ar_all_transactions
  131. WITH INHERIT NOLOGIN
  132. IN ROLE lsmb_<?lsmb dbname ?>__create_ar_transaction,
  133. lsmb_<?lsmb dbname ?>__create_ar_invoice,
  134. lsmb_<?lsmb dbname ?>__list_ar_transactions;
  135. CREATE ROLE lsmb_<?lsmb dbname ?>__create_sales_order
  136. WITH INHERIT NOLOGIN
  137. IN ROLE lsmb_<?lsmb dbname ?>__read_contact;
  138. GRANT INSERT ON oe TO lsmb_<?lsmb dbname ?>__create_sales_order;
  139. GRANT INSERT ON orderitems TO lsmb_<?lsmb dbname ?>__create_sales_order;
  140. CREATE ROLE lsmb_<?lsmb dbname ?>__create_sales_quotation
  141. WITH INHERIT NOLOGIN
  142. IN ROLE lsmb_<?lsmb dbname ?>__read_contact;
  143. GRANT INSERT ON oe TO lsmb_<?lsmb dbname ?>__create_sales_quotation;
  144. GRANT INSERT ON orderitems TO lsmb_<?lsmb dbname ?>__create_sales_quotation;
  145. CREATE ROLE lsmb_<?lsmb dbname ?>__list_sales_orders
  146. WITH INHERIT NOLOGIN
  147. IN ROLE lsmb_<?lsmb dbname ?>__read_contact;
  148. GRANT SELECT ON oe TO lsmb_<?lsmb dbname ?>__list_sales_orders;
  149. GRANT SELECT ON orderitems TO lsmb_<?lsmb dbname ?>__list_sales_orders;
  150. CREATE ROLE lsmb_<?lsmb dbname ?>__list_sales_quotations
  151. WITH INHERIT NOLOGIN
  152. IN ROLE lsmb_<?lsmb dbname ?>__read_contact;
  153. GRANT SELECT ON oe TO lsmb_<?lsmb dbname ?>__list_sales_quotations;
  154. GRANT SELECT ON orderitems TO lsmb_<?lsmb dbname ?>__list_sales_quotations;
  155. CREATE ROLE lsmb_<?lsmb dbname ?>__all_ar
  156. WITH INHERIT NOLOGIN
  157. IN ROLE lsmb_<?lsmb dbname ?>__ar_all_vouchers,
  158. lsmb_<?lsmb dbname ?>__ar_all_transactions,
  159. lsmb_<?lsmb dbname ?>__create_sales_order,
  160. lsmb_<?lsmb dbname ?>__create_sales_quotation,
  161. lsmb_<?lsmb dbname ?>__list_sales_orders,
  162. lsmb_<?lsmb dbname ?>__list_sales_quotations;
  163. -- AP
  164. CREATE ROLE lsmb_<?lsmb dbname ?>__create_ap_transaction
  165. WITH INHERIT NOLOGIN
  166. IN ROLE lsmb_<?lsmb dbname ?>__read_contact;
  167. CREATE ROLE lsmb_<?lsmb dbname ?>__create_ap_transaction_voucher
  168. WITH INHERIT NOLOGIN
  169. IN ROLE lsmb_<?lsmb dbname ?>__read_contact,
  170. lsmb_<?lsmb dbname ?>__create_batch;
  171. CREATE ROLE lsmb_<?lsmb dbname ?>__create_ap_invoice
  172. WITH INHERIT NOLOGIN
  173. IN ROLE lsmb_<?lsmb dbname ?>__read_contact;
  174. CREATE ROLE lsmb_<?lsmb dbname ?>__create_ap_invoice_voucher
  175. WITH INHERIT NOLOGIN
  176. IN ROLE lsmb_<?lsmb dbname ?>__read_contact,
  177. lsmb_<?lsmb dbname ?>__create_batch;
  178. CREATE ROLE lsmb_<?lsmb dbname ?>__list_ap_transactions
  179. WITH INHERIT NOLOGIN
  180. IN ROLE lsmb_<?lsmb dbname ?>__read_contact;
  181. CREATE ROLE lsmb_<?lsmb dbname ?>__ap_all_vouchers
  182. WITH INHERIT NOLOGIN
  183. IN ROLE lsmb_<?lsmb dbname ?>__create_ap_transaction_voucher,
  184. lsmb_<?lsmb dbname ?>__create_ap_invoice_voucher;
  185. CREATE ROLE lsmb_<?lsmb dbname ?>__ap_all_transactions
  186. WITH INHERIT NOLOGIN
  187. IN ROLE lsmb_<?lsmb dbname ?>__create_ap_transaction,
  188. lsmb_<?lsmb dbname ?>__create_ap_invoice,
  189. lsmb_<?lsmb dbname ?>__list_ap_transactions;
  190. CREATE ROLE lsmb_<?lsmb dbname ?>__create_purchase_order
  191. WITH INHERIT NOLOGIN
  192. IN ROLE lsmb_<?lsmb dbname ?>__read_contact;
  193. WITH INHERIT NOLOGIN;
  194. CREATE ROLE lsmb_<?lsmb dbname ?>__create_purchase_rfq
  195. WITH INHERIT NOLOGIN
  196. IN ROLE lsmb_<?lsmb dbname ?>__read_contact;
  197. CREATE ROLE lsmb_<?lsmb dbname ?>__list_purchase_orders
  198. WITH INHERIT NOLOGIN
  199. IN ROLE lsmb_<?lsmb dbname ?>__read_contact;
  200. CREATE ROLE lsmb_<?lsmb dbname ?>__list_purchase_rfqs
  201. WITH INHERIT NOLOGIN
  202. IN ROLE lsmb_<?lsmb dbname ?>__read_contact;
  203. CREATE ROLE lsmb_<?lsmb dbname ?>__all_ap
  204. WITH INHERIT NOLOGIN
  205. IN ROLE lsmb_<?lsmb dbname ?>__ap_all_vouchers,
  206. lsmb_<?lsmb dbname ?>__ap_all_transactions,
  207. lsmb_<?lsmb dbname ?>__create_purchase_order,
  208. lsmb_<?lsmb dbname ?>__create_purchase_rfq,
  209. lsmb_<?lsmb dbname ?>__list_purchase_orders,
  210. lsmb_<?lsmb dbname ?>__list_purchase_rfqs;
  211. -- POS
  212. CREATE ROLE lsmb_<?lsmb dbname ?>__create_pos_invoice
  213. WITH INHERIT NOLOGIN
  214. IN ROLE lsmb_<?lsmb dbname ?>__create_sales_invoice,
  215. lsmb_<?lsmb dbname ?>__create_ar_invoice;
  216. CREATE ROLE lsmb_<?lsmb dbname ?>__close_till
  217. WITH INHERIT NOLOGIN;
  218. CREATE ROLE lsmb_<?lsmb dbname ?>__list_all_open
  219. WITH INHERIT NOLOGIN;
  220. CREATE ROLE lsmb_<?lsmb dbname ?>__pos_cashier
  221. WITH INHERIT NOLOGIN
  222. lsmb_<?lsmb dbname ?>__create_pos_invoice,
  223. lsmb_<?lsmb dbname ?>__close_till;
  224. CREATE ROLE lsmb_<?lsmb dbname ?>__all_pos
  225. WITH INHERIT NOLOGIN
  226. IN ROLE lsmb_<?lsmb dbname ?>__pos_cashier,
  227. lsmb_<?lsmb dbname ?>__list_all_open;
  228. -- CASH
  229. CREATE ROLE lsmb_<?lsmb dbname ?>__reconcile
  230. WITH INHERIT NOLOGIN;
  231. CREATE ROLE lsmb_<?lsmb dbname ?>__approve_reconciliation
  232. WITH INHERIT NOLOGIN;
  233. CREATE ROLE lsmb_<?lsmb dbname ?>__all_reconcile
  234. WITH INHERIT NOLOGIN
  235. IN ROLE lsmb_<?lsmb dbname ?>__reconcile,
  236. lsmb_<?lsmb dbname ?>__approve_reconciliation;
  237. CREATE ROLE lsmb_<?lsmb dbname ?>__process_payment
  238. WITH INHERIT NOLOGIN
  239. IN ROLE ar_list_transactions;
  240. CREATE ROLE lsmb_<?lsmb dbname ?>__process_receipt
  241. WITH INHERIT NOLOGIN
  242. IN ROLE ap_list_transactions;
  243. CREATE ROLE lsmb_<?lsmb dbname ?>__cash_all
  244. WITH INHERIT NOLOGIN
  245. IN ROLE lsmb_<?lsmb dbname ?>__all_reconcile,
  246. lsmb_<?lsmb dbname ?>__process_payment,
  247. lsmb_<?lsmb dbname ?>__process_receipt;
  248. -- Inventory Control
  249. CREATE ROLE lsmb_<?lsmb dbname ?>__create_part
  250. WITH INHERIT NOLOGIN;
  251. CREATE ROLE lsmb_<?lsmb dbname ?>__inventory_reports
  252. WITH INHERIT NOLOGIN;
  253. CREATE ROLE lsmb_<?lsmb dbname ?>__stock_assembly
  254. WITH INHERIT NOLOGIN;
  255. CREATE ROLE lsmb_<?lsmb dbname ?>__ship_inventory
  256. WITH INHERIT NOLOGIN;
  257. CREATE ROLE lsmb_<?lsmb dbname ?>__receive_inventory
  258. WITH INHERIT NOLOGIN;
  259. CREATE ROLE lsmb_<?lsmb dbname ?>__create_warehouse
  260. WITH INHERIT NOLOGIN;
  261. CREATE ROLE lsmb_<?lsmb dbname ?>__all_inventory
  262. WITH INHERIT NOLOGIN
  263. IN ROLE lsmb_<?lsmb dbname ?>__create_part,
  264. lsmb_<?lsmb dbname ?>__inventory_reports,
  265. lsmb_<?lsmb dbname ?>__stock_assembly,
  266. lsmb_<?lsmb dbname ?>__ship_inventory,
  267. lsmb_<?lsmb dbname ?>__receive_inventory,
  268. lsmb_<?lsmb dbname ?>__create_warehouse;
  269. -- GL
  270. CREATE ROLE lsmb_<?lsmb dbname ?>__create_transaction
  271. WITH INHERIT NOLOGIN;
  272. CREATE ROLE lsmb_<?lsmb dbname ?>__create_transaction_voucher
  273. WITH INHERIT NOLOGIN;
  274. CREATE ROLE lsmb_<?lsmb dbname ?>__list_transactions
  275. WITH INHERIT NOLOGIN
  276. IN ROLE lsmb_<?lsmb dbname ?>__list_ar_transactions,
  277. lsmb_<?lsmb dbname ?>__list_ap_transactions;
  278. CREATE ROLE lsmb_<?lsmb dbname ?>__run_yearend
  279. WITH INHERIT NOLOGIN;
  280. CREATE ROLE lsmb_<?lsmb dbname ?>__create_list_batches
  281. WITH INHERIT NOLOGIN
  282. IN ROLE lsmb_<?lsmb dbname ?>__create_list_transactions;
  283. GRANT SELECT ON batch TO lsmb_<?lsmb dbname ?>__create_list_batches;
  284. GRANT SELECT ON batch_class TO lsmb_<?lsmb dbname ?>__create_list_batches;
  285. GRANT SELECT ON voucher TO lsmb_<?lsmb dbname ?>__create_list_batches;
  286. CREATE ROLE lsmb_<?lsmb dbname ?>__all_gl
  287. WITH INHERIT NOLOGIN
  288. IN ROLE lsmb_<?lsmb dbname ?>__create_transaction,
  289. lsmb_<?lsmb dbname ?>__create_transaction_voucher,
  290. lsmb_<?lsmb dbname ?>__run_yearend,
  291. lsmb_<?lsmb dbname ?>__list_transactions;
  292. -- PROJECTS
  293. CREATE ROLE lsmb_<?lsmb dbname ?>__create_project
  294. WITH INHERIT NOLOGIN;
  295. CREATE ROLE lsmb_<?lsmb dbname ?>__add_project_timecard
  296. WITH INHERIT NOLOGIN;
  297. -- ORDER GENERATION
  298. CREATE ROLE lsmb_<?lsmb dbname ?>__project_generate_orders
  299. WITH INHERIT NOLOGIN;
  300. CREATE ROLE lsmb_<?lsmb dbname ?>__sales_to_purchase_orders
  301. WITH INHERIT NOLOGIN;
  302. CREATE ROLE lsmb_<?lsmb dbname ?>__consolidate_purchase_orders
  303. WITH INHERIT NOLOGIN;
  304. CREATE ROLE lsmb_<?lsmb dbname ?>__consolidate_sales_orders
  305. WITH INHERIT NOLOGIN;
  306. CREATE ROLE lsmb_<?lsmb dbname ?>__manage_orders
  307. WITH INHERIT NOLOGIN
  308. IN ROLE lsmb_<?lsmb dbname ?>__project_generate_orders,
  309. lsmb_<?lsmb dbname ?>__sales_to_purchase_orders,
  310. lsmb_<?lsmb dbname ?>__consolidate_purchase_orders,
  311. lsmb_<?lsmb dbname ?>__consolidate_sales_orders;
  312. -- FINANCIAL REPORTS
  313. CREATE ROLE lsmb_<?lsmb dbname ?>__run_financial_reports
  314. WITH INHERIT NOLOGIN
  315. IN ROLE lsmb_<?lsmb dbname ?>__list_transactions;
  316. -- RECURRING TRANSACTIONS
  317. -- TO ADD WHEN THIS IS REDESIGNED
  318. -- BATCH PRINTING
  319. CREATE ROLE lsmb_<?lsmb dbname ?>__list_print_jobs
  320. WITH INHERIT NOLOGIN;
  321. CREATE ROLE lsmb_<?lsmb dbname ?>__print_jobs
  322. WITH INHERIT NOLOGIN;
  323. CREATE ROLE lsmb_<?lsmb dbname ?>__all_batch_printing
  324. WITH INHERIT NOLOGIN
  325. IN ROLE lsmb_<?lsmb dbname ?>__list_print_jobs,
  326. lsmb_<?lsmb dbname ?>__print_jobs;
  327. -- SYSTEM SETTINGS
  328. CREATE ROLE lsmb_<?lsmb dbname ?>__list_system_settings
  329. WITH INHERIT NOLOGIN;
  330. CREATE ROLE lsmb_<?lsmb dbname ?>__change_system_settings
  331. WITH INHERIT NOLOGIN
  332. IN ROLE lsmb_<?lsmb dbname ?>__list_system_settings;
  333. CREATE ROLE lsmb_<?lsmb dbname ?>__set_taxes
  334. WITH INHERIT NOLOGIN;
  335. CREATE ROLE lsmb_<?lsmb dbname ?>__create_account
  336. WITH INHERIT NOLOGIN;
  337. CREATE ROLE lsmb_<?lsmb dbname ?>__edit_account
  338. WITH INHERIT NOLOGIN;
  339. CREATE ROLE lsmb_<?lsmb dbname ?>__create_gifi
  340. WITH INHERIT NOLOGIN;
  341. CREATE ROLE lsmb_<?lsmb dbname ?>__edit_gifi
  342. WITH INHERIT NOLOGIN;
  343. CREATE ROLE lsmb_<?lsmb dbname ?>__all_accounts
  344. WITH INHERIT NOLOGIN
  345. IN ROLE lsmb_<?lsmb dbname ?>__create_account,
  346. lsmb_<?lsmb dbname ?>__set_taxes,
  347. lsmb_<?lsmb dbname ?>__edit_account,
  348. lsmb_<?lsmb dbname ?>__create_gifi;
  349. lsmb_<?lsmb dbname ?>__edit_gifi;
  350. CREATE ROLE lsmb_<?lsmb dbname ?>__create_department
  351. WITH INHERIT NOLOGIN;
  352. CREATE ROLE lsmb_<?lsmb dbname ?>__edit_department
  353. WITH INHERIT NOLOGIN;
  354. CREATE ROLE lsmb_<?lsmb dbname ?>__all_department
  355. WITH INHERIT NOLOGIN
  356. IN ROLE lsmb_<?lsmb dbname ?>__create_department,
  357. lsmb_<?lsmb dbname ?>__edit_department;
  358. CREATE ROLE lsmb_<?lsmb dbname ?>__create_business_type
  359. WITH INHERIT NOLOGIN;
  360. CREATE ROLE lsmb_<?lsmb dbname ?>__edit_business_type
  361. WITH INHERIT NOLOGIN;
  362. CREATE ROLE lsmb_<?lsmb dbname ?>__all_business_type
  363. WITH INHERIT NOLOGIN
  364. IN ROLE lsmb_<?lsmb dbname ?>__create_business_type,
  365. lsmb_<?lsmb dbname ?>__edit_business_type;
  366. CREATE ROLE lsmb_<?lsmb dbname ?>__create_sic
  367. WITH INHERIT NOLOGIN;
  368. CREATE ROLE lsmb_<?lsmb dbname ?>__edit_sic
  369. WITH INHERIT NOLOGIN;
  370. CREATE ROLE lsmb_<?lsmb dbname ?>__all_sic
  371. WITH INHERIT NOLOGIN
  372. IN ROLE lsmb_<?lsmb dbname ?>__create_sic,
  373. lsmb_<?lsmb dbname ?>__edit_sic;
  374. CREATE ROLE lsmb_<?lsmb dbname ?>__edit_template
  375. WITH INHERIT NOLOGIN;
  376. CREATE ROLE lsmb_<?lsmb dbname ?>__manage_system
  377. WITH INHERIT NOLOGIN
  378. IN ROLE lsmb_<?lsmb dbname ?>__change_system_settings,
  379. lsmb_<?lsmb dbname ?>__all_accounts,
  380. lsmb_<?lsmb dbname ?>__all_department,
  381. lsmb_<?lsmb dbname ?>__all_business_type,
  382. lsmb_<?lsmb dbname ?>__all_sic,
  383. lsmb_<?lsmb dbname ?>__edit_template;
  384. -- Manual Translation
  385. CREATE ROLE lsmb_<?lsmb dbname ?>__create_language
  386. WITH INHERIT NOLOGIN;
  387. CREATE ROLE lsmb_<?lsmb dbname ?>__create_part_translation
  388. WITH INHERIT NOLOGIN;
  389. CREATE ROLE lsmb_<?lsmb dbname ?>__create_project_translation
  390. WITH INHERIT NOLOGIN;
  391. CREATE ROLE lsmb_<?lsmb dbname ?>__all_manual_translation
  392. WITH INHERIT NOLOGIN
  393. IN ROLE lsmb_<?lsmb dbname ?>__create_language,
  394. lsmb_<?lsmb dbname ?>__create_part_translation,
  395. lsmb_<?lsmb dbname ?>__create_project_translation;