mirror of
https://github.com/nuxsmin/sysPass.git
synced 2026-03-05 08:04:09 +01:00
* [MOD] UI tweaks
* [MOD] Updated DB structure * [MOD] Updated build number
This commit is contained in:
@@ -116,6 +116,7 @@ CREATE TABLE `accounts` (
|
||||
`account_otherGroupEdit` bit(1) DEFAULT b'0',
|
||||
`account_otherUserEdit` bit(1) DEFAULT b'0',
|
||||
`account_isPrivate` bit(1) DEFAULT b'0',
|
||||
`account_isPrivateGroup` BIT(1) NULL DEFAULT b'0',
|
||||
`account_passDate` int(11) unsigned DEFAULT NULL,
|
||||
`account_passDateChange` int(11) unsigned DEFAULT NULL,
|
||||
`account_parentId` smallint(5) unsigned DEFAULT NULL,
|
||||
@@ -410,74 +411,84 @@ CREATE TABLE `notices` (
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
DROP TABLE IF EXISTS `account_data_v`;
|
||||
CREATE OR REPLACE ALGORITHM = UNDEFINED DEFINER = CURRENT_USER SQL SECURITY DEFINER VIEW `account_data_v` AS SELECT
|
||||
`accounts`.`account_id` AS `account_id`,
|
||||
`accounts`.`account_name` AS `account_name`,
|
||||
`accounts`.`account_categoryId` AS `account_categoryId`,
|
||||
`accounts`.`account_userId` AS `account_userId`,
|
||||
`accounts`.`account_customerId` AS `account_customerId`,
|
||||
`accounts`.`account_userGroupId` AS `account_userGroupId`,
|
||||
`accounts`.`account_userEditId` AS `account_userEditId`,
|
||||
`accounts`.`account_login` AS `account_login`,
|
||||
`accounts`.`account_url` AS `account_url`,
|
||||
`accounts`.`account_notes` AS `account_notes`,
|
||||
`accounts`.`account_countView` AS `account_countView`,
|
||||
`accounts`.`account_countDecrypt` AS `account_countDecrypt`,
|
||||
`accounts`.`account_dateAdd` AS `account_dateAdd`,
|
||||
`accounts`.`account_dateEdit` AS `account_dateEdit`,
|
||||
conv(`accounts`.`account_otherUserEdit`, 10, 2) AS `account_otherUserEdit`,
|
||||
conv(`accounts`.`account_otherGroupEdit`, 10, 2) AS `account_otherGroupEdit`,
|
||||
conv(`accounts`.`account_isPrivate`, 10, 2) AS `account_isPrivate`,
|
||||
`accounts`.`account_passDate` AS `account_passDate`,
|
||||
`accounts`.`account_passDateChange` AS `account_passDateChange`,
|
||||
`accounts`.`account_parentId` AS `account_parentId`,
|
||||
`categories`.`category_name` AS `category_name`,
|
||||
`customers`.`customer_name` AS `customer_name`,
|
||||
`ug`.`usergroup_name` AS `usergroup_name`,
|
||||
`u1`.`user_name` AS `user_name`,
|
||||
`u1`.`user_login` AS `user_login`,
|
||||
`u2`.`user_name` AS `user_editName`,
|
||||
`u2`.`user_login` AS `user_editLogin`,
|
||||
`publicLinks`.`publicLink_hash` AS `publicLink_hash`
|
||||
FROM ((((((`accounts`
|
||||
LEFT JOIN `categories` ON ((`accounts`.`account_categoryId` = `categories`.`category_id`))) LEFT JOIN
|
||||
`usrGroups` `ug` ON ((`accounts`.`account_userGroupId` = `ug`.`usergroup_id`))) LEFT JOIN `usrData` `u1`
|
||||
ON ((`accounts`.`account_userId` = `u1`.`user_id`))) LEFT JOIN `usrData` `u2`
|
||||
ON ((`accounts`.`account_userEditId` = `u2`.`user_id`))) LEFT JOIN `customers`
|
||||
ON ((`accounts`.`account_customerId` = `customers`.`customer_id`))) LEFT JOIN `publicLinks`
|
||||
ON ((`accounts`.`account_id` = `publicLinks`.`publicLink_itemId`)));
|
||||
CREATE OR REPLACE ALGORITHM = UNDEFINED DEFINER = CURRENT_USER SQL SECURITY DEFINER VIEW `account_data_v` AS
|
||||
SELECT
|
||||
`accounts`.`account_id` AS `account_id`,
|
||||
`accounts`.`account_name` AS `account_name`,
|
||||
`accounts`.`account_categoryId` AS `account_categoryId`,
|
||||
`accounts`.`account_userId` AS `account_userId`,
|
||||
`accounts`.`account_customerId` AS `account_customerId`,
|
||||
`accounts`.`account_userGroupId` AS `account_userGroupId`,
|
||||
`accounts`.`account_userEditId` AS `account_userEditId`,
|
||||
`accounts`.`account_login` AS `account_login`,
|
||||
`accounts`.`account_url` AS `account_url`,
|
||||
`accounts`.`account_notes` AS `account_notes`,
|
||||
`accounts`.`account_countView` AS `account_countView`,
|
||||
`accounts`.`account_countDecrypt` AS `account_countDecrypt`,
|
||||
`accounts`.`account_dateAdd` AS `account_dateAdd`,
|
||||
`accounts`.`account_dateEdit` AS `account_dateEdit`,
|
||||
CONV(`accounts`.`account_otherUserEdit`,
|
||||
10,
|
||||
2) AS `account_otherUserEdit`,
|
||||
CONV(`accounts`.`account_otherGroupEdit`,
|
||||
10,
|
||||
2) AS `account_otherGroupEdit`,
|
||||
CONV(`accounts`.`account_isPrivate`, 10, 2) AS `account_isPrivate`,
|
||||
CONV(`accounts`.`account_isPrivateGroup`, 10, 2) AS `account_isPrivateGroup`,
|
||||
`accounts`.`account_passDate` AS `account_passDate`,
|
||||
`accounts`.`account_passDateChange` AS `account_passDateChange`,
|
||||
`accounts`.`account_parentId` AS `account_parentId`,
|
||||
`categories`.`category_name` AS `category_name`,
|
||||
`customers`.`customer_name` AS `customer_name`,
|
||||
`ug`.`usergroup_name` AS `usergroup_name`,
|
||||
`u1`.`user_name` AS `user_name`,
|
||||
`u1`.`user_login` AS `user_login`,
|
||||
`u2`.`user_name` AS `user_editName`,
|
||||
`u2`.`user_login` AS `user_editLogin`,
|
||||
`publicLinks`.`publicLink_hash` AS `publicLink_hash`
|
||||
FROM
|
||||
((((((`accounts`
|
||||
LEFT JOIN `categories` ON ((`accounts`.`account_categoryId` = `categories`.`category_id`)))
|
||||
LEFT JOIN `usrGroups` `ug` ON ((`accounts`.`account_userGroupId` = `ug`.`usergroup_id`)))
|
||||
LEFT JOIN `usrData` `u1` ON ((`accounts`.`account_userId` = `u1`.`user_id`)))
|
||||
LEFT JOIN `usrData` `u2` ON ((`accounts`.`account_userEditId` = `u2`.`user_id`)))
|
||||
LEFT JOIN `customers` ON ((`accounts`.`account_customerId` = `customers`.`customer_id`)))
|
||||
LEFT JOIN `publicLinks` ON ((`accounts`.`account_id` = `publicLinks`.`publicLink_itemId`)));
|
||||
|
||||
DROP TABLE IF EXISTS `account_search_v`;
|
||||
CREATE OR REPLACE ALGORITHM = UNDEFINED DEFINER = CURRENT_USER SQL SECURITY DEFINER VIEW `account_search_v` AS SELECT DISTINCT
|
||||
`accounts`.`account_id` AS `account_id`,
|
||||
`accounts`.`account_customerId` AS `account_customerId`,
|
||||
`accounts`.`account_categoryId` AS `account_categoryId`,
|
||||
`accounts`.`account_name` AS `account_name`,
|
||||
`accounts`.`account_login` AS `account_login`,
|
||||
`accounts`.`account_url` AS `account_url`,
|
||||
`accounts`.`account_notes` AS `account_notes`,
|
||||
`accounts`.`account_userId` AS `account_userId`,
|
||||
`accounts`.`account_userGroupId` AS `account_userGroupId`,
|
||||
`accounts`.`account_otherUserEdit` AS `account_otherUserEdit`,
|
||||
`accounts`.`account_otherGroupEdit` AS `account_otherGroupEdit`,
|
||||
`accounts`.`account_isPrivate` AS `account_isPrivate`,
|
||||
`accounts`.`account_passDate` AS `account_passDate`,
|
||||
`accounts`.`account_passDateChange` AS `account_passDateChange`,
|
||||
`accounts`.`account_parentId` AS `account_parentId`,
|
||||
`accounts`.`account_countView` AS `account_countView`,
|
||||
`ug`.`usergroup_name` AS `usergroup_name`,
|
||||
`categories`.`category_name` AS `category_name`,
|
||||
`customers`.`customer_name` AS `customer_name`,
|
||||
(SELECT COUNT(0)
|
||||
FROM
|
||||
`accFiles`
|
||||
WHERE
|
||||
(`accFiles`.`accfile_accountId` = `accounts`.`account_id`)) AS `num_files`
|
||||
FROM
|
||||
(((`accounts`
|
||||
LEFT JOIN `categories` ON ((`accounts`.`account_categoryId` = `categories`.`category_id`)))
|
||||
LEFT JOIN `usrGroups` `ug` ON ((`accounts`.`account_userGroupId` = `ug`.`usergroup_id`)))
|
||||
LEFT JOIN `customers` ON ((`customers`.`customer_id` = `accounts`.`account_customerId`)));
|
||||
CREATE OR REPLACE ALGORITHM = UNDEFINED DEFINER = CURRENT_USER SQL SECURITY DEFINER VIEW `account_search_v` AS
|
||||
SELECT DISTINCT
|
||||
`accounts`.`account_id` AS `account_id`,
|
||||
`accounts`.`account_customerId` AS `account_customerId`,
|
||||
`accounts`.`account_categoryId` AS `account_categoryId`,
|
||||
`accounts`.`account_name` AS `account_name`,
|
||||
`accounts`.`account_login` AS `account_login`,
|
||||
`accounts`.`account_url` AS `account_url`,
|
||||
`accounts`.`account_notes` AS `account_notes`,
|
||||
`accounts`.`account_userId` AS `account_userId`,
|
||||
`accounts`.`account_userGroupId` AS `account_userGroupId`,
|
||||
`accounts`.`account_otherUserEdit` AS `account_otherUserEdit`,
|
||||
`accounts`.`account_otherGroupEdit` AS `account_otherGroupEdit`,
|
||||
`accounts`.`account_isPrivate` AS `account_isPrivate`,
|
||||
`accounts`.`account_isPrivateGroup` AS `account_isPrivateGroup`,
|
||||
`accounts`.`account_passDate` AS `account_passDate`,
|
||||
`accounts`.`account_passDateChange` AS `account_passDateChange`,
|
||||
`accounts`.`account_parentId` AS `account_parentId`,
|
||||
`accounts`.`account_countView` AS `account_countView`,
|
||||
`ug`.`usergroup_name` AS `usergroup_name`,
|
||||
`categories`.`category_name` AS `category_name`,
|
||||
`customers`.`customer_name` AS `customer_name`,
|
||||
(SELECT
|
||||
COUNT(0)
|
||||
FROM
|
||||
`accFiles`
|
||||
WHERE
|
||||
(`accFiles`.`accfile_accountId` = `accounts`.`account_id`)) AS `num_files`
|
||||
FROM
|
||||
(((`accounts`
|
||||
LEFT JOIN `categories` ON ((`accounts`.`account_categoryId` = `categories`.`category_id`)))
|
||||
LEFT JOIN `usrGroups` `ug` ON ((`accounts`.`account_userGroupId` = `ug`.`usergroup_id`)))
|
||||
LEFT JOIN `customers` ON ((`customers`.`customer_id` = `accounts`.`account_customerId`)));
|
||||
|
||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
|
||||
Reference in New Issue
Block a user