-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #86 from leon-mbs/dev
v4.3.0
- Loading branch information
Showing
58 changed files
with
1,293 additions
and
691 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
|
||
SET NAMES 'utf8'; | ||
|
||
|
||
|
||
INSERT INTO `users` (`user_id`, `userlogin`, `userpass`, `createdon`, `email`, `acl`, `disabled`, `options`) VALUES(4, 'admin', '$2y$10$GsjC.thVpQAPMQMO6b4Ma.olbIFr2KMGFz12l5/wnmxI1PEqRDQf.', '2017-01-01', '[email protected]', 'a:8:{s:7:"acltype";i:0;s:6:"onlymy";i:0;s:7:"aclview";N;s:7:"acledit";N;s:6:"aclexe";N;s:9:"aclbranch";N;s:7:"widgets";N;s:7:"modules";N;}', 0, 'a:4:{s:9:"smartmenu";s:3:"7,8";s:8:"defstore";s:2:"19";s:5:"defmf";s:1:"2";s:8:"pagesize";s:2:"15";}'); | ||
INSERT INTO `users` ( `userlogin`, `userpass`, `createdon`, `email`, `acl`, `disabled`, `options`) VALUES( 'admin', '$2y$10$GsjC.thVpQAPMQMO6b4Ma.olbIFr2KMGFz12l5/wnmxI1PEqRDQf.', '2017-01-01', '[email protected]', 'a:8:{s:7:"acltype";i:0;s:6:"onlymy";i:0;s:7:"aclview";N;s:7:"acledit";N;s:6:"aclexe";N;s:9:"aclbranch";N;s:7:"widgets";N;s:7:"modules";N;}', 0, 'a:4:{s:9:"smartmenu";s:3:"7,8";s:8:"defstore";s:2:"19";s:5:"defmf";s:1:"2";s:8:"pagesize";s:2:"15";}'); | ||
INSERT INTO `roles` ( `rolename`, `acl`) VALUES ( 'admins', NULL); | ||
UPDATE users set role_id=(select role_id from roles where rolename='admins' limit 0,1 ) where userlogin='admin' ; | ||
|
||
|
||
INSERT INTO `stores` ( `storename`, `description`) VALUES( 'Основной склад', ''); | ||
|
@@ -71,4 +72,5 @@ INSERT INTO `metadata` (`meta_id`, `meta_type`, `description`, `meta_name`, `men | |
INSERT INTO `metadata` (`meta_id`, `meta_type`, `description`, `meta_name`, `menugroup`, `disabled`) VALUES(71, 3, 'Товары на складе', 'ItemList', 'Склад', 0); | ||
INSERT INTO `metadata` (`meta_id`, `meta_type`, `description`, `meta_name`, `menugroup`, `disabled`) VALUES(76, 1, 'Выплата зарплаты', 'OutSalary', 'Платежи', 0); | ||
INSERT INTO `metadata` (`meta_id`, `meta_type`, `description`, `meta_name`, `menugroup`, `disabled`) VALUES(77, 2, 'Отчет по зарплате', 'SalaryRep', 'Платежи', 0); | ||
INSERT INTO `metadata` ( `meta_type`, `description`, `meta_name`, `menugroup`, `disabled`) VALUES( 2, 'Движение по контрагентам', 'CustActivity', 'Платежи', 0); | ||
INSERT INTO `metadata` (`meta_type`, `description`, `meta_name`, `menugroup`, `disabled`) VALUES( 2, 'Движение по контрагентам', 'CustActivity', 'Платежи', 0); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,8 @@ SET NAMES 'utf8'; | |
|
||
|
||
INSERT INTO `users` (`user_id`, `userlogin`, `userpass`, `createdon`, `email`, `acl`, `disabled`, `options`) VALUES(4, 'admin', '$2y$10$GsjC.thVpQAPMQMO6b4Ma.olbIFr2KMGFz12l5/wnmxI1PEqRDQf.', '2017-01-01', '[email protected]', 'a:8:{s:7:"acltype";i:0;s:6:"onlymy";i:0;s:7:"aclview";N;s:7:"acledit";N;s:6:"aclexe";N;s:9:"aclbranch";N;s:7:"widgets";N;s:7:"modules";N;}', 0, 'a:4:{s:9:"smartmenu";s:3:"7,8";s:8:"defstore";s:2:"19";s:5:"defmf";s:1:"2";s:8:"pagesize";s:2:"15";}'); | ||
INSERT INTO `roles` ( `rolename`, `acl`) VALUES ( 'admins', NULL); | ||
UPDATE users set role_id=(select role_id from roles where rolename='admins' limit 0,1 ) where userlogin='admin'; | ||
|
||
|
||
INSERT INTO `stores` (`store_id`, `storename`, `description`, `branch_id`) VALUES (28, 'Основний склад', '', 0); | ||
|
@@ -71,4 +73,4 @@ INSERT INTO `metadata` (`meta_id`, `meta_type`, `description`, `meta_name`, `men | |
INSERT INTO `metadata` (`meta_id`, `meta_type`, `description`, `meta_name`, `menugroup`, `disabled`) VALUES(75, 5, 'Експорт', 'Export', '', 0); | ||
INSERT INTO `metadata` (`meta_id`, `meta_type`, `description`, `meta_name`, `menugroup`, `disabled`) VALUES(76, 1, 'Виплата зарплати', 'OutSalary', 'Платежі', 0); | ||
INSERT INTO `metadata` (`meta_id`, `meta_type`, `description`, `meta_name`, `menugroup`, `disabled`) VALUES(77, 2, 'Звіт по зарплаті', 'SalaryRep', 'Платежі', 0); | ||
INSERT INTO `metadata` ( `meta_type`, `description`, `meta_name`, `menugroup`, `disabled`) VALUES( 2, 'Рух по контрагентах', 'CustActivity', 'Платежі', 0); | ||
INSERT INTO `metadata` (`meta_type`, `description`, `meta_name`, `menugroup`, `disabled`) VALUES( 2, 'Рух по контрагентах', 'CustActivity', 'Платежі', 0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
CREATE TABLE `roles` ( `role_id` INT NOT NULL AUTO_INCREMENT , `rolename` VARCHAR(255) NULL , `acl` MEDIUMTEXT NULL , PRIMARY KEY (`role_id`)) ; | ||
|
||
ALTER TABLE `users` ADD `role_id` INT NULL ; | ||
|
||
CREATE VIEW `roles_view` AS | ||
select | ||
`roles`.`role_id` AS `role_id`, | ||
`roles`.`rolename` AS `rolename`, | ||
`roles`.`acl` AS `acl`, | ||
( | ||
select | ||
coalesce(count(*), 0) | ||
from | ||
`users` | ||
where | ||
(`users`.`role_id` = `roles`.`role_id`)) AS `cnt` | ||
from | ||
`roles`; | ||
|
||
|
||
ALTER VIEW `users_view` AS | ||
select | ||
`users`.`user_id` AS `user_id`, | ||
`users`.`userlogin` AS `userlogin`, | ||
`users`.`userpass` AS `userpass`, | ||
`users`.`createdon` AS `createdon`, | ||
`users`.`email` AS `email`, | ||
`users`.`acl` AS `acl`, | ||
`users`.`options` AS `options`, | ||
`users`.`disabled` AS `disabled`, | ||
`roles`.`rolename` AS `rolename`, | ||
`users`.`role_id` AS `role_id`, | ||
`roles`.`acl` AS `roleacl`, | ||
coalesce(`employees`.`employee_id`, | ||
0) AS `employee_id`, | ||
(case when isnull(`employees`.`emp_name`) then `users`.`userlogin` else `employees`.`emp_name` end) AS `username` | ||
from | ||
((`users` left join `employees` on(((`users`.`userlogin` = `employees`.`login`) and (`employees`.`disabled` <> 1)))) left join `roles` on((`users`.`role_id` = `roles`.`role_id`))); | ||
|
||
|
||
INSERT INTO `roles` (`role_id`, `rolename`, `acl`) VALUES (NULL, 'admins', NULL); | ||
|
||
UPDATE users set role_id=(select role_id from roles where rolename='admins' limit 0,1 ) where userlogin='admin' | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.