Skip to content

armgit / Vvveb

Public Imported from GitHub
0

Powerful and easy to use cms to build websites, blogs or ecommerce stores.

New role and user for site admins, has all access except admin user management

givanz28450b5289d3
diff --git a/install/sql/insert/admin/admin.sql b/install/sql/insert/admin/admin.sql
index 46c5716..640b4c2 100755
--- a/install/sql/insert/admin/admin.sql
+++ b/install/sql/insert/admin/admin.sql
@@ -1,11 +1,12 @@
INSERT INTO `admin` (`admin_id`, `username`, `first_name`, `last_name`,`password`, `email`, `url`, `created_at`, `token`, `status`, `site_access`, `display_name`, `avatar`, `bio`, `role_id`) VALUES
-(1, 'admin', 'Admin', 'Admin', '$2y$11$o52ahesifBsklkPV8eTWSeoKbBHJXxaoDZUIDYiFYdAmHQSyfDM3W', '[email protected]', '', '2022-05-01 00:00:00', '', 0, '[]', 'Admin', 'vvveb.svg', 'This is a brief biography', 1),
-(2, 'administrator', 'Administrator', 'Administrator', '$2y$11$o52ahesifBsklkPV8eTWSeoKbBHJXxaoDZUIDYiFYdAmHQSyfDM3W', '[email protected]', '', '2022-05-01 00:00:00', '', 0, '[]', 'Administrator', 'vvveb.svg', 'This is a brief biography', 2),
-(3, 'editor', 'Editor', 'Editor','$2y$11$o52ahesifBsklkPV8eTWSeoKbBHJXxaoDZUIDYiFYdAmHQSyfDM3W', '[email protected]', '', '2022-05-01 00:00:00', '', 0, '[]', 'Editor', 'vvveb.svg', 'This is a brief biography', 3),
-(4, 'author', 'Author', 'Author', '$2y$11$o52ahesifBsklkPV8eTWSeoKbBHJXxaoDZUIDYiFYdAmHQSyfDM3W', '[email protected]', '', '2022-05-01 00:00:00', '', 0, '[]', 'Author', 'vvveb.svg', 'This is a brief biography', 4),
-(5, 'contributor', 'Contributor', 'Contributor', '$2y$11$o52ahesifBsklkPV8eTWSeoKbBHJXxaoDZUIDYiFYdAmHQSyfDM3W', '[email protected]', '', '2022-05-01 00:00:00', '', 0, '[]', 'Contributor', 'vvveb.svg', 'This is a brief biography', 5),
-(6, 'shop', 'Shop', 'Shop', '$2y$11$o52ahesifBsklkPV8eTWSeoKbBHJXxaoDZUIDYiFYdAmHQSyfDM3W', '[email protected]', '', '2022-05-01 00:00:00', '', 0, '[]', 'Shop assistant', 'vvveb.svg', 'This is a brief biography', 6),
-(7, 'vendor', 'Vendor', 'Vendor', '$2y$11$o52ahesifBsklkPV8eTWSeoKbBHJXxaoDZUIDYiFYdAmHQSyfDM3W', '[email protected]', '', '2022-05-01 00:00:00', '', 0, '[]', 'Vendor', 'vvveb.svg', 'This is a brief biography', 7),
-(8, 'rest', 'Rest', 'Rest', '$2y$11$o52ahesifBsklkPV8eTWSeoKbBHJXxaoDZUIDYiFYdAmHQSyfDM3W', '[email protected]', '', '2022-05-01 00:00:00', '', 0, '[]', 'Rest Api', 'vvveb.svg', 'This is a brief biography', 8),
-(9, 'demo', 'Demo', 'Demo', '$2y$11$oNa5z5S1gabs8vB/GU9KRuFxw1psuMx8rPaVjnVLm8mm./ufAiRgm', '[email protected]', '', '2022-05-01 00:00:00', '', 0, '[]', 'Demo', 'vvveb.svg', 'This is a brief biography', 9);
\ No newline at end of file
+(1, 'admin', 'Admin', 'Admin', '$2y$11$o52ahesifBsklkPV8eTWSeoKbBHJXxaoDZUIDYiFYdAmHQSyfDM3W', '[email protected]', '', '2022-05-01 00:00:00', '', 0, '[]', 'Admin', 'vvveb.svg', 'Has access everywhere', 1),
+(2, 'administrator', 'Administrator', 'Administrator', '$2y$11$o52ahesifBsklkPV8eTWSeoKbBHJXxaoDZUIDYiFYdAmHQSyfDM3W', '[email protected]', '', '2022-05-01 00:00:00', '', 0, '[]', 'Administrator', 'vvveb.svg', 'Has access everywhere except admin user and role management', 2),
+(3, 'site-admin', 'Site Administrator', 'Site Administrator', '$2y$11$o52ahesifBsklkPV8eTWSeoKbBHJXxaoDZUIDYiFYdAmHQSyfDM3W', '[email protected]', '', '2022-05-01 00:00:00', '', 0, '[]', 'Site Admin', 'vvveb.svg', 'Manages content, products and orders', 3),
+(4, 'editor', 'Editor', 'Editor','$2y$11$o52ahesifBsklkPV8eTWSeoKbBHJXxaoDZUIDYiFYdAmHQSyfDM3W', '[email protected]', '', '2022-05-01 00:00:00', '', 0, '[]', 'Editor', 'vvveb.svg', 'Manages content', 4),
+(5, 'author', 'Author', 'Author', '$2y$11$o52ahesifBsklkPV8eTWSeoKbBHJXxaoDZUIDYiFYdAmHQSyfDM3W', '[email protected]', '', '2022-05-01 00:00:00', '', 0, '[]', 'Author', 'vvveb.svg', 'Can add and update content', 5),
+(6, 'contributor', 'Contributor', 'Contributor', '$2y$11$o52ahesifBsklkPV8eTWSeoKbBHJXxaoDZUIDYiFYdAmHQSyfDM3W', '[email protected]', '', '2022-05-01 00:00:00', '', 0, '[]', 'Contributor', 'vvveb.svg', 'Can add and update content', 5),
+(7, 'shop', 'Shop', 'Shop', '$2y$11$o52ahesifBsklkPV8eTWSeoKbBHJXxaoDZUIDYiFYdAmHQSyfDM3W', '[email protected]', '', '2022-05-01 00:00:00', '', 0, '[]', 'Shop assistant', 'vvveb.svg', 'Manages products and orders', 7),
+(8, 'vendor', 'Vendor', 'Vendor', '$2y$11$o52ahesifBsklkPV8eTWSeoKbBHJXxaoDZUIDYiFYdAmHQSyfDM3W', '[email protected]', '', '2022-05-01 00:00:00', '', 0, '[]', 'Vendor', 'vvveb.svg', 'Can add own products and process orders', 8),
+(9, 'rest', 'Rest', 'Rest', '$2y$11$o52ahesifBsklkPV8eTWSeoKbBHJXxaoDZUIDYiFYdAmHQSyfDM3W', '[email protected]', '', '2022-05-01 00:00:00', '', 0, '[]', 'Rest Api', 'vvveb.svg', 'Rest API access user', 9),
+(10, 'demo', 'Demo', 'Demo', '$2y$11$oNa5z5S1gabs8vB/GU9KRuFxw1psuMx8rPaVjnVLm8mm./ufAiRgm', '[email protected]', '', '2022-05-01 00:00:00', '', 0, '[]', 'Demo', 'vvveb.svg', 'Read only account with access everywhere', 10);
\ No newline at end of file
diff --git a/install/sql/insert/admin/role.sql b/install/sql/insert/admin/role.sql
index f9a797c..3be6bcb 100755
--- a/install/sql/insert/admin/role.sql
+++ b/install/sql/insert/admin/role.sql
@@ -1,10 +1,11 @@
INSERT INTO `role` (`role_id`, `name`, `display_name`, `permissions`) VALUES
(1, 'super_admin', 'Super Administrator', '{"allow":["*"], "deny":[], "capabilities":["view_other_posts","edit_other_posts","view_other_products","edit_other_products","view_other_sites","edit_other_sites"]}'),
(2, 'admin', 'Administrator', '{"allow":["*"], "deny":["admin/*"], "capabilities":["view_other_posts","edit_other_posts","view_other_products","edit_other_products","view_other_sites","edit_other_sites"]}'),
-(3, 'editor', 'Editor', '{"allow":["index/index","content/*", "editor/*","media/media/scan"], "deny":[], "capabilities":["view_other_posts","edit_other_posts","view_other_products","edit_other_products","view_other_sites","edit_other_sites"]}'),
-(4, 'author', 'Author', '{"allow":["index/index","content/*", "editor/*","media/media/scan"], "deny":[]}'),
-(5, 'contributor', 'Contributor', '{"allow":["index/index","content/*", "editor/*","media/media/scan"], "deny":[]}'),
-(6, 'shop', 'Shop', '{"allow":["index/index","product/*","order/*","media/media/scan"], "deny":[], "capabilities":["view_other_products","edit_other_products"]}'),
-(7, 'vendor', 'Vendor', '{"allow":["index/index","product/*","order/*","media/media/scan"], "deny":["product/vendors/*","product/vendor/*","product/manufacturers/*", "product/manufacturer/*"]}'),
-(8, 'rest', 'Rest', '{"allow":["content/*"],"deny":["*/save","*/delete"], "capabilities":["view_other_products","edit_other_products"]}}'),
-(9, 'demo', 'Demo', '{"allow":["*"],"deny":["*/save","*/delete","*/rename","*/upload", "*/activate","*/deactivate","*/update","*/deletemenu"], "capabilities":["view_other_posts","view_other_products","view_other_sites"]}');
+(3, 'site_admin', 'Site Administrator', '{"allow":["index/index","content/*","user/*","product/*","order/*","editor/*","media/*","settings/*","tools/*"], "deny":["settings/email/*", "tools/update/*", "tools/cron/*","settings/site/add"], "capabilities":["view_other_posts","edit_other_posts","view_other_products","edit_other_products","view_other_sites","edit_other_sites"]}'),
+(4, 'editor', 'Editor', '{"allow":["index/index","content/*", "editor/*","media/media/scan"], "deny":[], "capabilities":["view_other_posts","edit_other_posts","view_other_products","edit_other_products","view_other_sites","edit_other_sites"]}'),
+(5, 'author', 'Author', '{"allow":["index/index","content/*", "editor/*","media/media/scan"], "deny":[]}'),
+(6, 'contributor', 'Contributor', '{"allow":["index/index","content/*","editor/*","media/media/scan"], "deny":[]}'),
+(7, 'shop', 'Shop', '{"allow":["index/index","product/*","order/*","media/media/scan"], "deny":[], "capabilities":["view_other_products","edit_other_products"]}'),
+(8, 'vendor', 'Vendor', '{"allow":["index/index","product/*","order/*","media/media/scan"], "deny":["product/vendors/*","product/vendor/*","product/manufacturers/*", "product/manufacturer/*"]}'),
+(9, 'rest', 'Rest', '{"allow":["content/*"],"deny":["*/save","*/delete"], "capabilities":["view_other_products","edit_other_products"]}}'),
+(10, 'demo', 'Demo', '{"allow":["*"],"deny":["*/save","*/delete","*/rename","*/upload", "*/activate","*/deactivate","*/update","*/deletemenu"], "capabilities":["view_other_posts","view_other_products","view_other_sites"]}');