diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 295a3b638..d14e385a3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -212,7 +212,7 @@ jobs: report_name: Coverage Frontend type: lcov result_path: ./coverage/lcov.info - min_coverage: 12 + min_coverage: 13 token: ${{ github.token }} #test: diff --git a/community_server/db/address_types.sql b/community_server/db/address_types.sql deleted file mode 100644 index 27f6bb410..000000000 --- a/community_server/db/address_types.sql +++ /dev/null @@ -1,6 +0,0 @@ -CREATE TABLE `address_types` ( - `id` INT NOT NULL AUTO_INCREMENT, - `name` VARCHAR(25) NOT NULL, - `text` VARCHAR(255) NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; \ No newline at end of file diff --git a/community_server/db/operators.sql b/community_server/db/operators.sql deleted file mode 100644 index 8ffa9f04f..000000000 --- a/community_server/db/operators.sql +++ /dev/null @@ -1,7 +0,0 @@ -CREATE TABLE `operators` ( - `id` INT NOT NULL AUTO_INCREMENT , - `username` VARCHAR(128) NOT NULL , - `data_base64` VARCHAR(255) NOT NULL , - PRIMARY KEY (`id`), UNIQUE (`username`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; - diff --git a/community_server/skeema/gradido_community/insert/address_types.sql b/community_server/db/setup_db_tables/address_types.sql similarity index 100% rename from community_server/skeema/gradido_community/insert/address_types.sql rename to community_server/db/setup_db_tables/address_types.sql diff --git a/community_server/skeema/gradido_community/insert/insert_blockchain_types.sql b/community_server/db/setup_db_tables/insert_blockchain_types.sql similarity index 100% rename from community_server/skeema/gradido_community/insert/insert_blockchain_types.sql rename to community_server/db/setup_db_tables/insert_blockchain_types.sql diff --git a/community_server/skeema/gradido_community/insert/insert_transaction_types.sql b/community_server/db/setup_db_tables/insert_transaction_types.sql similarity index 100% rename from community_server/skeema/gradido_community/insert/insert_transaction_types.sql rename to community_server/db/setup_db_tables/insert_transaction_types.sql diff --git a/community_server/skeema/gradido_community/address_types.sql b/community_server/db/skeema/gradido_community/address_types.sql similarity index 100% rename from community_server/skeema/gradido_community/address_types.sql rename to community_server/db/skeema/gradido_community/address_types.sql diff --git a/community_server/skeema/gradido_community/admin_errors.sql b/community_server/db/skeema/gradido_community/admin_errors.sql similarity index 100% rename from community_server/skeema/gradido_community/admin_errors.sql rename to community_server/db/skeema/gradido_community/admin_errors.sql diff --git a/community_server/skeema/gradido_community/blockchain_types.sql b/community_server/db/skeema/gradido_community/blockchain_types.sql similarity index 100% rename from community_server/skeema/gradido_community/blockchain_types.sql rename to community_server/db/skeema/gradido_community/blockchain_types.sql diff --git a/community_server/skeema/gradido_community/community_profiles.sql b/community_server/db/skeema/gradido_community/community_profiles.sql similarity index 100% rename from community_server/skeema/gradido_community/community_profiles.sql rename to community_server/db/skeema/gradido_community/community_profiles.sql diff --git a/community_server/skeema/gradido_community/operator_types.sql b/community_server/db/skeema/gradido_community/operator_types.sql similarity index 100% rename from community_server/skeema/gradido_community/operator_types.sql rename to community_server/db/skeema/gradido_community/operator_types.sql diff --git a/community_server/skeema/gradido_community/operators.sql b/community_server/db/skeema/gradido_community/operators.sql similarity index 100% rename from community_server/skeema/gradido_community/operators.sql rename to community_server/db/skeema/gradido_community/operators.sql diff --git a/community_server/skeema/gradido_community/pending_transactions.sql b/community_server/db/skeema/gradido_community/pending_transactions.sql similarity index 100% rename from community_server/skeema/gradido_community/pending_transactions.sql rename to community_server/db/skeema/gradido_community/pending_transactions.sql diff --git a/community_server/skeema/gradido_community/roles.sql b/community_server/db/skeema/gradido_community/roles.sql similarity index 100% rename from community_server/skeema/gradido_community/roles.sql rename to community_server/db/skeema/gradido_community/roles.sql diff --git a/community_server/skeema/gradido_community/server_users.sql b/community_server/db/skeema/gradido_community/server_users.sql similarity index 100% rename from community_server/skeema/gradido_community/server_users.sql rename to community_server/db/skeema/gradido_community/server_users.sql diff --git a/community_server/skeema/gradido_community/state_balances.sql b/community_server/db/skeema/gradido_community/state_balances.sql similarity index 100% rename from community_server/skeema/gradido_community/state_balances.sql rename to community_server/db/skeema/gradido_community/state_balances.sql diff --git a/community_server/skeema/gradido_community/state_created.sql b/community_server/db/skeema/gradido_community/state_created.sql similarity index 100% rename from community_server/skeema/gradido_community/state_created.sql rename to community_server/db/skeema/gradido_community/state_created.sql diff --git a/community_server/skeema/gradido_community/state_errors.sql b/community_server/db/skeema/gradido_community/state_errors.sql similarity index 100% rename from community_server/skeema/gradido_community/state_errors.sql rename to community_server/db/skeema/gradido_community/state_errors.sql diff --git a/community_server/skeema/gradido_community/state_group_addresses.sql b/community_server/db/skeema/gradido_community/state_group_addresses.sql similarity index 100% rename from community_server/skeema/gradido_community/state_group_addresses.sql rename to community_server/db/skeema/gradido_community/state_group_addresses.sql diff --git a/community_server/skeema/gradido_community/state_group_relationships.sql b/community_server/db/skeema/gradido_community/state_group_relationships.sql similarity index 100% rename from community_server/skeema/gradido_community/state_group_relationships.sql rename to community_server/db/skeema/gradido_community/state_group_relationships.sql diff --git a/community_server/skeema/gradido_community/state_groups.sql b/community_server/db/skeema/gradido_community/state_groups.sql similarity index 100% rename from community_server/skeema/gradido_community/state_groups.sql rename to community_server/db/skeema/gradido_community/state_groups.sql diff --git a/community_server/skeema/gradido_community/state_relationship_types.sql b/community_server/db/skeema/gradido_community/state_relationship_types.sql similarity index 100% rename from community_server/skeema/gradido_community/state_relationship_types.sql rename to community_server/db/skeema/gradido_community/state_relationship_types.sql diff --git a/community_server/skeema/gradido_community/state_user_roles.sql b/community_server/db/skeema/gradido_community/state_user_roles.sql similarity index 100% rename from community_server/skeema/gradido_community/state_user_roles.sql rename to community_server/db/skeema/gradido_community/state_user_roles.sql diff --git a/community_server/skeema/gradido_community/state_user_transactions.sql b/community_server/db/skeema/gradido_community/state_user_transactions.sql similarity index 100% rename from community_server/skeema/gradido_community/state_user_transactions.sql rename to community_server/db/skeema/gradido_community/state_user_transactions.sql diff --git a/community_server/skeema/gradido_community/state_users.sql b/community_server/db/skeema/gradido_community/state_users.sql similarity index 100% rename from community_server/skeema/gradido_community/state_users.sql rename to community_server/db/skeema/gradido_community/state_users.sql diff --git a/community_server/skeema/gradido_community/transaction_creations.sql b/community_server/db/skeema/gradido_community/transaction_creations.sql similarity index 90% rename from community_server/skeema/gradido_community/transaction_creations.sql rename to community_server/db/skeema/gradido_community/transaction_creations.sql index a2ff37539..8612c764a 100644 --- a/community_server/skeema/gradido_community/transaction_creations.sql +++ b/community_server/db/skeema/gradido_community/transaction_creations.sql @@ -3,7 +3,7 @@ CREATE TABLE `transaction_creations` ( `transaction_id` int(10) unsigned NOT NULL, `state_user_id` int(10) unsigned NOT NULL, `amount` bigint(20) NOT NULL, - `ident_hash` binary(32) NOT NULL, + `ident_hash` binary(32) NULL, `target_date` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; diff --git a/community_server/skeema/gradido_community/transaction_group_addaddress.sql b/community_server/db/skeema/gradido_community/transaction_group_addaddress.sql similarity index 100% rename from community_server/skeema/gradido_community/transaction_group_addaddress.sql rename to community_server/db/skeema/gradido_community/transaction_group_addaddress.sql diff --git a/community_server/skeema/gradido_community/transaction_group_allowtrades.sql b/community_server/db/skeema/gradido_community/transaction_group_allowtrades.sql similarity index 100% rename from community_server/skeema/gradido_community/transaction_group_allowtrades.sql rename to community_server/db/skeema/gradido_community/transaction_group_allowtrades.sql diff --git a/community_server/skeema/gradido_community/transaction_group_creates.sql b/community_server/db/skeema/gradido_community/transaction_group_creates.sql similarity index 100% rename from community_server/skeema/gradido_community/transaction_group_creates.sql rename to community_server/db/skeema/gradido_community/transaction_group_creates.sql diff --git a/community_server/skeema/gradido_community/transaction_send_coins.sql b/community_server/db/skeema/gradido_community/transaction_send_coins.sql similarity index 100% rename from community_server/skeema/gradido_community/transaction_send_coins.sql rename to community_server/db/skeema/gradido_community/transaction_send_coins.sql diff --git a/community_server/skeema/gradido_community/transaction_signatures.sql b/community_server/db/skeema/gradido_community/transaction_signatures.sql similarity index 100% rename from community_server/skeema/gradido_community/transaction_signatures.sql rename to community_server/db/skeema/gradido_community/transaction_signatures.sql diff --git a/community_server/skeema/gradido_community/transaction_types.sql b/community_server/db/skeema/gradido_community/transaction_types.sql similarity index 100% rename from community_server/skeema/gradido_community/transaction_types.sql rename to community_server/db/skeema/gradido_community/transaction_types.sql diff --git a/community_server/skeema/gradido_community/transactions.sql b/community_server/db/skeema/gradido_community/transactions.sql similarity index 100% rename from community_server/skeema/gradido_community/transactions.sql rename to community_server/db/skeema/gradido_community/transactions.sql diff --git a/community_server/db/state_balances.sql b/community_server/db/state_balances.sql deleted file mode 100644 index 0bc263093..000000000 --- a/community_server/db/state_balances.sql +++ /dev/null @@ -1,7 +0,0 @@ -CREATE TABLE `state_balances` ( - `id` int(11) NOT NULL, - `state_user_id` int(11) NOT NULL, - `modified` datetime NOT NULL, - `amount` bigint(20) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; \ No newline at end of file diff --git a/community_server/db/state_created.sql b/community_server/db/state_created.sql deleted file mode 100644 index a15ccacd3..000000000 --- a/community_server/db/state_created.sql +++ /dev/null @@ -1,10 +0,0 @@ -CREATE TABLE `state_created` ( - `id` int(11) NOT NULL, - `transaction_id` int(11) NOT NULL, - `month` tinyint(4) NOT NULL, - `year` smallint(6) NOT NULL, - `state_user_id` int(11) NOT NULL, - `created` datetime NOT NULL, - `short_ident_hash` int(11) NOT NULL, - PRIMARY KEY (`id`), INDEX(`short_ident_hash`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; diff --git a/community_server/db/state_group_addresses.sql b/community_server/db/state_group_addresses.sql deleted file mode 100644 index 3e09b8658..000000000 --- a/community_server/db/state_group_addresses.sql +++ /dev/null @@ -1,7 +0,0 @@ -CREATE TABLE `state_group_addresses` ( - `id` int(11) NOT NULL, - `state_group_id` int(11) NOT NULL, - `public_key` binary(32) NOT NULL, - `address_type_id` int(11) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; diff --git a/community_server/db/state_group_relationships.sql b/community_server/db/state_group_relationships.sql deleted file mode 100644 index 0d26e91b6..000000000 --- a/community_server/db/state_group_relationships.sql +++ /dev/null @@ -1,7 +0,0 @@ -CREATE TABLE `state_group_relationships` ( - `id` int(11) NOT NULL, - `state_group1_id` int(11) NOT NULL, - `state_group2_id` int(11) NOT NULL, - `state_relationship_id` int(11) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; diff --git a/community_server/db/state_groups.sql b/community_server/db/state_groups.sql deleted file mode 100644 index dc5ca5251..000000000 --- a/community_server/db/state_groups.sql +++ /dev/null @@ -1,8 +0,0 @@ -CREATE TABLE `state_groups` ( - `id` INT NOT NULL AUTO_INCREMENT, - `index_id` VARBINARY(64) NOT NULL, - `name` VARCHAR(50) NOT NULL, - `root_public_key` BINARY(32) NOT NULL, - `user_count` SMALLINT NOT NULL DEFAULT '0', - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; \ No newline at end of file diff --git a/community_server/db/state_relationship_types.sql b/community_server/db/state_relationship_types.sql deleted file mode 100644 index d6e53a966..000000000 --- a/community_server/db/state_relationship_types.sql +++ /dev/null @@ -1,6 +0,0 @@ -CREATE TABLE `state_relationship_types` ( - `id` int(11) NOT NULL, - `name` varchar(25) COLLATE utf8_bin NOT NULL, - `text` varchar(255) COLLATE utf8_bin DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; diff --git a/community_server/db/state_users.sql b/community_server/db/state_users.sql deleted file mode 100644 index 82d61f10e..000000000 --- a/community_server/db/state_users.sql +++ /dev/null @@ -1,7 +0,0 @@ -CREATE TABLE `state_users` ( - `id` int(11) NOT NULL, - `index_id` smallint(6) NOT NULL, - `state_group_id` int(11) NOT NULL, - `public_key` binary(32) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; diff --git a/community_server/db/transaction_creations.sql b/community_server/db/transaction_creations.sql deleted file mode 100644 index 343404ddb..000000000 --- a/community_server/db/transaction_creations.sql +++ /dev/null @@ -1,10 +0,0 @@ - -CREATE TABLE `transaction_creations` ( - `id` int(11) NOT NULL, - `transaction_id` int(11) NOT NULL, - `state_user_id` int(11) NOT NULL, - `amount` bigint(20) NOT NULL, - `ident_hash` binary(32) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; - diff --git a/community_server/db/transaction_group_addAddress.sql b/community_server/db/transaction_group_addAddress.sql deleted file mode 100644 index f7474cc73..000000000 --- a/community_server/db/transaction_group_addAddress.sql +++ /dev/null @@ -1,8 +0,0 @@ - -CREATE TABLE `transaction_group_addaddress` ( - `id` int(11) NOT NULL, - `transaction_id` int(11) NOT NULL, - `address_type_id` int(11) NOT NULL, - `public_key` binary(32) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; diff --git a/community_server/db/transaction_group_allowtrades.sql b/community_server/db/transaction_group_allowtrades.sql deleted file mode 100644 index 2fd94b4d6..000000000 --- a/community_server/db/transaction_group_allowtrades.sql +++ /dev/null @@ -1,8 +0,0 @@ - -CREATE TABLE `transaction_group_allowtrades` ( - `id` int(11) NOT NULL, - `transaction_id` int(11) NOT NULL, - `group_id` int(11) NOT NULL, - `allow` tinyint(1) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; diff --git a/community_server/db/transaction_group_creates.sql b/community_server/db/transaction_group_creates.sql deleted file mode 100644 index 0c0d7cc5d..000000000 --- a/community_server/db/transaction_group_creates.sql +++ /dev/null @@ -1,9 +0,0 @@ - -CREATE TABLE `transaction_group_creates` ( - `id` int(11) NOT NULL, - `transaction_id` int(11) NOT NULL, - `group_public_key` binary(32) NOT NULL, - `state_group_id` int(11) COLLATE utf8_bin NOT NULL, - `name` varchar(64) COLLATE utf8_bin NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; diff --git a/community_server/db/transaction_send_coins.sql b/community_server/db/transaction_send_coins.sql deleted file mode 100644 index 8113c78e0..000000000 --- a/community_server/db/transaction_send_coins.sql +++ /dev/null @@ -1,11 +0,0 @@ - -CREATE TABLE `transaction_send_coins` ( - `id` int(11) NOT NULL, - `transaction_id` int(11) NOT NULL, - `state_user_id` int(11) NOT NULL, - `receiver_public_key` binary(32) NOT NULL, - `receiver_user_id` varbinary(64) NOT NULL, - `amount` bigint(20) NOT NULL, - `sender_final_balance` bigint(20) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; diff --git a/community_server/db/transaction_signatures.sql b/community_server/db/transaction_signatures.sql deleted file mode 100644 index 9fab87fb2..000000000 --- a/community_server/db/transaction_signatures.sql +++ /dev/null @@ -1,7 +0,0 @@ -CREATE TABLE `transaction_signatures` ( - `id` int(11) NOT NULL, - `transaction_id` int(11) NOT NULL, - `signature` binary(64) NOT NULL, - `pubkey` binary(32) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; diff --git a/community_server/db/transaction_types.sql b/community_server/db/transaction_types.sql deleted file mode 100644 index 26bd70c52..000000000 --- a/community_server/db/transaction_types.sql +++ /dev/null @@ -1,6 +0,0 @@ -CREATE TABLE `transaction_types` ( - `id` INT NOT NULL AUTO_INCREMENT, - `name` VARCHAR(24) NOT NULL, - `text` VARCHAR(255) NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; \ No newline at end of file diff --git a/community_server/db/transactions.sql b/community_server/db/transactions.sql deleted file mode 100644 index e664b067f..000000000 --- a/community_server/db/transactions.sql +++ /dev/null @@ -1,9 +0,0 @@ - -CREATE TABLE `transactions` ( - `id` bigint(20) NOT NULL, - `state_group_id` int(11) NOT NULL, - `transaction_type_id` int(11) NOT NULL, - `tx_hash` binary(32) NOT NULL, - `received` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; diff --git a/community_server/src/Model/Table/StateBalancesTable.php b/community_server/src/Model/Table/StateBalancesTable.php index 0878f5a23..d3dfa0709 100644 --- a/community_server/src/Model/Table/StateBalancesTable.php +++ b/community_server/src/Model/Table/StateBalancesTable.php @@ -180,7 +180,7 @@ class StateBalancesTable extends Table $transactions = $transactionsTable ->find('all') - ->where(['id IN' => array_keys($transaction_ids)]) + ->where(['Transactions.id IN' => array_keys($transaction_ids)]) ->contain(['TransactionCreations', 'TransactionSendCoins']); $transactions_indiced = []; diff --git a/configs/community_server/app.php b/configs/community_server/app.php index ee2244636..f0cf46220 100644 --- a/configs/community_server/app.php +++ b/configs/community_server/app.php @@ -427,6 +427,6 @@ return [ ], 'ServerAdminEmail' => 'info@gradido.net', 'noReplyEmail' => 'no-reply@gradido.net', - 'disableEmail' => false + 'disableEmail' => true ]; diff --git a/configs/login_server/setup_db_tables/setup_docker_group.sql b/configs/login_server/setup_db_tables/setup_docker_group.sql new file mode 100644 index 000000000..5f1b64c3f --- /dev/null +++ b/configs/login_server/setup_db_tables/setup_docker_group.sql @@ -0,0 +1,6 @@ +INSERT INTO `groups` (`id`, `alias`, `name`, `url`, `host`, `home`, `description`) VALUES +(1, 'docker', 'docker gradido group', 'localhost', 'nginx', '/', 'gradido test group for docker and stage2 with blockchain db'); + + + + diff --git a/login_server/skeema/gradido_login/insert/setup_hedera_group.sql b/configs/login_server/setup_db_tables/setup_hedera_group.sql similarity index 74% rename from login_server/skeema/gradido_login/insert/setup_hedera_group.sql rename to configs/login_server/setup_db_tables/setup_hedera_group.sql index 8dd601b97..2ae4dfeb6 100644 --- a/login_server/skeema/gradido_login/insert/setup_hedera_group.sql +++ b/configs/login_server/setup_db_tables/setup_hedera_group.sql @@ -1,19 +1,19 @@ -INSERT INTO `groups` (`id`, `alias`, `name`, `url`, `home`, `description`) VALUES -(1, 'dockerStage2', 'docker stage2 gradido group', 'localhost', '/', 'gradido test group for docker and stage2'); - -INSERT INTO `hedera_ids` (`id`, `shardNum`, `realmNum`, `num`) VALUES -(1, 0, 0, 3), -(2, 0, 0, 3327), -(3, 0, 0, 413151); - -INSERT INTO `node_servers` (`id`, `url`, `port`, `group_id`, `server_type`, `node_hedera_id`, `last_live_sign`) VALUES -(1, 'http://0.testnet.hedera.com', 50211, 0, 4, 1, '2000-01-01 00:00:00'); - -INSERT INTO `hedera_accounts` (`id`, `user_id`, `account_hedera_id`, `account_key_id`, `balance`, `network_type`, `updated`) VALUES -(1, 1, 2, 1, 1000000000000, 1, '2021-01-07 10:22:52'); - -INSERT INTO `hedera_topics` (`id`, `topic_hedera_id`, `name`, `auto_renew_account_hedera_id`, `auto_renew_period`, `group_id`, `admin_key_id`, `submit_key_id`, `current_timeout`, `sequence_number`, `running_hash`, `running_hash_version`, `updated`) VALUES -(1, 3, 'dockerStage2', 1, 7890000, 1, 0, 0, '2021-06-08 23:17:19', 0, NULL, 0, '2021-03-09 16:42:34'); - - - +INSERT INTO `groups` (`id`, `alias`, `name`, `url`, `host`, `home`, `description`) VALUES +(2, 'dockerStage2', 'docker stage2 gradido group', 'localhost', 'nginx', '/', 'gradido test group for docker and stage2'); + +INSERT INTO `hedera_ids` (`id`, `shardNum`, `realmNum`, `num`) VALUES +(1, 0, 0, 3), +(2, 0, 0, 3327), +(3, 0, 0, 413151); + +INSERT INTO `node_servers` (`id`, `url`, `port`, `group_id`, `server_type`, `node_hedera_id`, `last_live_sign`) VALUES +(1, 'http://0.testnet.hedera.com', 50211, 0, 4, 2, '2000-01-01 00:00:00'); + +INSERT INTO `hedera_accounts` (`id`, `user_id`, `account_hedera_id`, `account_key_id`, `balance`, `network_type`, `updated`) VALUES +(1, 1, 2, 1, 1000000000000, 1, '2021-01-07 10:22:52'); + +INSERT INTO `hedera_topics` (`id`, `topic_hedera_id`, `name`, `auto_renew_account_hedera_id`, `auto_renew_period`, `group_id`, `admin_key_id`, `submit_key_id`, `current_timeout`, `sequence_number`, `running_hash`, `running_hash_version`, `updated`) VALUES +(1, 3, 'dockerStage2', 1, 7890000, 1, 0, 0, '2021-06-08 23:17:19', 0, NULL, 0, '2021-03-09 16:42:34'); + + + diff --git a/docu/login_server.api.md b/docu/login_server.api.md index 27d83c06a..70f19cdde 100644 --- a/docu/login_server.api.md +++ b/docu/login_server.api.md @@ -56,6 +56,7 @@ In case of success returns: "first_name": "Max", "group_alias": "gdd1", "ident_hash": 323769895, + "language":"de", "last_name": "Mustermann", "public_hex": "131c7f68dd94b2be4c913400ff7ff4cdc03ac2bda99c2d29edcacb3b065c67e6", "role": "none", @@ -74,6 +75,7 @@ In case of success returns: - `first_name`: first name of user - `group_alias`: alias of group/community to which user belong - `ident_hash`: currently hash of email, will be later a identification hash to prevent multiple accounts and therefore multiple creations per user + - `language`: language of user, currently only "de" or "en" - `last_name`: last name of user - `public_hex`: public key of user in hex format - `role`: role of user currently only "none" or "admin" @@ -302,6 +304,7 @@ In case of success returns: "first_name": "Max", "group_alias": "gdd1", "ident_hash": 323769895, + "language": "de", "last_name": "Mustermann", "public_hex": "131c7f68dd94b2be4c913400ff7ff4cdc03ac2bda99c2d29edcacb3b065c67e6", "role": "none", @@ -326,6 +329,7 @@ In case of success returns: - `first_name`: first name of user - `group_alias`: alias of group/community to which user belong - `ident_hash`: currently hash of email, will be later a identification hash to prevent multiple accounts and therefore multiple creations per user + - `language`: language of user, currently only "de" or "en" - `last_name`: last name of user - `public_hex`: public key of user in hex format - `role`: role of user currently only "none" or "admin" diff --git a/frontend/src/views/KontoOverview/GddSend.vue b/frontend/src/views/KontoOverview/GddSend.vue index 5e81f512c..264bb714d 100644 --- a/frontend/src/views/KontoOverview/GddSend.vue +++ b/frontend/src/views/KontoOverview/GddSend.vue @@ -9,7 +9,7 @@ - + @@ -31,11 +31,13 @@ - - - {{ $t('form.cancel') }} - - +
+ + + {{ $t('form.cancel') }} + + +
diff --git a/frontend/src/views/Pages/Register.vue b/frontend/src/views/Pages/Register.vue index 49e38e04b..d583d8520 100755 --- a/frontend/src/views/Pages/Register.vue +++ b/frontend/src/views/Pages/Register.vue @@ -65,11 +65,8 @@ > - - + + diff --git a/login_server/Dockerfiles/build_and_run.sh b/login_server/Dockerfiles/build_and_run.sh index b246d8230..fa3e95859 100644 --- a/login_server/Dockerfiles/build_and_run.sh +++ b/login_server/Dockerfiles/build_and_run.sh @@ -4,10 +4,12 @@ cp build/conan* build_vol/ cd build_vol cmake -DCMAKE_BUILD_TYPE=Debug .. +make -j${CPU_COUNT} protoc grpc_cpp_plugin cd .. -if [ ! -d "./src/cpp/proto/hedera" ] ; then +if [ ! -f "./src/cpp/proto/gradido/TransactionBody.pb.h" ] ; then chmod +x unix_parse_proto.sh + echo "parse proto files" ./unix_parse_proto.sh fi chmod +x compile_pot.sh diff --git a/login_server/skeema/gradido_login/groups.sql b/login_server/skeema/gradido_login/groups.sql index 240c56ba5..9d57a3b2c 100644 --- a/login_server/skeema/gradido_login/groups.sql +++ b/login_server/skeema/gradido_login/groups.sql @@ -3,6 +3,7 @@ CREATE TABLE `groups` ( `alias` varchar(190) NOT NULL, `name` varchar(255) NOT NULL, `url` varchar(255) NOT NULL, + `host` varchar(255) DEFAULT "/", `home` varchar(255) DEFAULT "/", `description` text, PRIMARY KEY (`id`), diff --git a/login_server/skeema/gradido_login/insert/setup_docker_group.sql b/login_server/skeema/gradido_login/insert/setup_docker_group.sql deleted file mode 100644 index 53a556758..000000000 --- a/login_server/skeema/gradido_login/insert/setup_docker_group.sql +++ /dev/null @@ -1,6 +0,0 @@ -INSERT INTO `groups` (`id`, `alias`, `name`, `url`, `home`, `description`) VALUES -(2, 'docker', 'docker gradido group', 'localhost', '/', 'gradido test group for docker and stage2 with blockchain db'); - - - - diff --git a/login_server/src/cpp/HTTPInterface/AdminGroupsPage.cpp b/login_server/src/cpp/HTTPInterface/AdminGroupsPage.cpp index c83a41564..807889d11 100644 --- a/login_server/src/cpp/HTTPInterface/AdminGroupsPage.cpp +++ b/login_server/src/cpp/HTTPInterface/AdminGroupsPage.cpp @@ -5,10 +5,10 @@ #include "Poco/DeflatingStream.h" -#line 7 "F:\\Gradido\\gradido_login_server\\src\\cpsp\\adminGroups.cpsp" +#line 7 "F:\\Gradido\\gradido_local\\login_server\\src\\cpsp\\adminGroups.cpsp" #include "../controller/Group.h" -#line 1 "F:\\Gradido\\gradido_login_server\\src\\cpsp\\header_large.cpsp" +#line 1 "F:\\Gradido\\gradido_local\\login_server\\src\\cpsp\\header_large.cpsp" #include "../ServerConfig.h" @@ -27,7 +27,7 @@ void AdminGroupsPage::handleRequest(Poco::Net::HTTPServerRequest& request, Poco: if (_compressResponse) response.set("Content-Encoding", "gzip"); Poco::Net::HTMLForm form(request, request.stream()); -#line 10 "F:\\Gradido\\gradido_login_server\\src\\cpsp\\adminGroups.cpsp" +#line 10 "F:\\Gradido\\gradido_local\\login_server\\src\\cpsp\\adminGroups.cpsp" const char* pageName = "Gruppen"; @@ -46,6 +46,7 @@ void AdminGroupsPage::handleRequest(Poco::Net::HTTPServerRequest& request, Poco: alias, form.get("group-name", ""), form.get("group-url", ""), + form.get("group-host", ""), form.get("group-home", ""), form.get("group-desc", "") ); @@ -58,7 +59,7 @@ void AdminGroupsPage::handleRequest(Poco::Net::HTTPServerRequest& request, Poco: //auto groups = controller::Group::load("gdd1"); //std::vector> groups; -#line 3 "F:\\Gradido\\gradido_login_server\\src\\cpsp\\header_large.cpsp" +#line 3 "F:\\Gradido\\gradido_local\\login_server\\src\\cpsp\\header_large.cpsp" bool withMaterialIcons = false; std::ostream& _responseStream = response.send(); @@ -73,20 +74,20 @@ void AdminGroupsPage::handleRequest(Poco::Net::HTTPServerRequest& request, Poco: responseStream << "\n"; responseStream << "\n"; responseStream << "Gradido Login Server: "; -#line 11 "F:\\Gradido\\gradido_login_server\\src\\cpsp\\header_large.cpsp" +#line 11 "F:\\Gradido\\gradido_local\\login_server\\src\\cpsp\\header_large.cpsp" responseStream << ( pageName ); responseStream << "\n"; responseStream << "\n"; -#line 13 "F:\\Gradido\\gradido_login_server\\src\\cpsp\\header_large.cpsp" +#line 13 "F:\\Gradido\\gradido_local\\login_server\\src\\cpsp\\header_large.cpsp" if(withMaterialIcons) { responseStream << "\n"; responseStream << "\n"; -#line 15 "F:\\Gradido\\gradido_login_server\\src\\cpsp\\header_large.cpsp" +#line 15 "F:\\Gradido\\gradido_local\\login_server\\src\\cpsp\\header_large.cpsp" } responseStream << "\n"; responseStream << "\n"; responseStream << "\n"; @@ -95,29 +96,29 @@ void AdminGroupsPage::handleRequest(Poco::Net::HTTPServerRequest& request, Poco: responseStream << "\t\t\t
\n"; responseStream << "\t\t\t\t
    \n"; responseStream << "\t\t\t\t\t"; -#line 22 "F:\\Gradido\\gradido_login_server\\src\\cpsp\\header_large.cpsp" +#line 22 "F:\\Gradido\\gradido_local\\login_server\\src\\cpsp\\header_large.cpsp" if(!user.isNull()) { responseStream << "\n"; responseStream << "\t\t\t\t\t\t
  • getGroupBaseUrl() ); responseStream << "/\">Startseite
  • \n"; responseStream << "\t\t\t\t\t"; -#line 24 "F:\\Gradido\\gradido_login_server\\src\\cpsp\\header_large.cpsp" +#line 24 "F:\\Gradido\\gradido_local\\login_server\\src\\cpsp\\header_large.cpsp" } responseStream << "\n"; responseStream << "\t\t\t\t\t
  • Gruppen
  • \n"; responseStream << "\t\t\t\t\t
  • Node Server
  • \n"; responseStream << "\t\t\t\t\t
  • Hedera Accounts
  • \n"; responseStream << "\t\t\t\t\t
  • Hedera Topics
  • \n"; responseStream << "\t\t\t\t
\n"; @@ -126,7 +127,7 @@ void AdminGroupsPage::handleRequest(Poco::Net::HTTPServerRequest& request, Poco: responseStream << "\t\t
"; // end include header_large.cpsp responseStream << "\n"; -#line 41 "F:\\Gradido\\gradido_login_server\\src\\cpsp\\adminGroups.cpsp" +#line 42 "F:\\Gradido\\gradido_local\\login_server\\src\\cpsp\\adminGroups.cpsp" responseStream << ( getErrorsHtml() ); responseStream << "\n"; responseStream << "
\n"; @@ -140,44 +141,49 @@ void AdminGroupsPage::handleRequest(Poco::Net::HTTPServerRequest& request, Poco: responseStream << "\t\t\t\t
Name
\n"; responseStream << "\t\t\t\t
Alias
\n"; responseStream << "\t\t\t\t
Url
\n"; + responseStream << "\t\t\t\t
Host
\n"; responseStream << "\t\t\t\t
Home
\n"; responseStream << "\t\t\t\t
"; -#line 54 "F:\\Gradido\\gradido_login_server\\src\\cpsp\\adminGroups.cpsp" +#line 56 "F:\\Gradido\\gradido_local\\login_server\\src\\cpsp\\adminGroups.cpsp" responseStream << ( gettext("Description") ); responseStream << "
\n"; responseStream << "\t\t\t
\n"; responseStream << "\t\t\t"; -#line 56 "F:\\Gradido\\gradido_login_server\\src\\cpsp\\adminGroups.cpsp" +#line 58 "F:\\Gradido\\gradido_local\\login_server\\src\\cpsp\\adminGroups.cpsp" for(auto it = groups.begin(); it != groups.end(); it++) { auto group_model = (*it)->getModel(); responseStream << "\n"; responseStream << "\t\t\t\t
\n"; responseStream << "\t\t\t\t\t
"; -#line 59 "F:\\Gradido\\gradido_login_server\\src\\cpsp\\adminGroups.cpsp" +#line 61 "F:\\Gradido\\gradido_local\\login_server\\src\\cpsp\\adminGroups.cpsp" responseStream << ( group_model->getID() ); responseStream << "
\n"; responseStream << "\t\t\t\t\t
"; -#line 60 "F:\\Gradido\\gradido_login_server\\src\\cpsp\\adminGroups.cpsp" +#line 62 "F:\\Gradido\\gradido_local\\login_server\\src\\cpsp\\adminGroups.cpsp" responseStream << ( group_model->getName() ); responseStream << "
\n"; responseStream << "\t\t\t\t\t
"; -#line 61 "F:\\Gradido\\gradido_login_server\\src\\cpsp\\adminGroups.cpsp" +#line 63 "F:\\Gradido\\gradido_local\\login_server\\src\\cpsp\\adminGroups.cpsp" responseStream << ( group_model->getAlias() ); responseStream << "
\n"; responseStream << "\t\t\t\t\t
"; -#line 62 "F:\\Gradido\\gradido_login_server\\src\\cpsp\\adminGroups.cpsp" +#line 64 "F:\\Gradido\\gradido_local\\login_server\\src\\cpsp\\adminGroups.cpsp" responseStream << ( group_model->getUrl() ); responseStream << "
\n"; + responseStream << "\t\t\t\t\t
"; +#line 65 "F:\\Gradido\\gradido_local\\login_server\\src\\cpsp\\adminGroups.cpsp" + responseStream << ( group_model->getHost() ); + responseStream << "
\n"; responseStream << "\t\t\t\t\t
"; -#line 63 "F:\\Gradido\\gradido_login_server\\src\\cpsp\\adminGroups.cpsp" +#line 66 "F:\\Gradido\\gradido_local\\login_server\\src\\cpsp\\adminGroups.cpsp" responseStream << ( group_model->getHome() ); responseStream << "
\n"; responseStream << "\t\t\t\t\t
"; -#line 64 "F:\\Gradido\\gradido_login_server\\src\\cpsp\\adminGroups.cpsp" +#line 67 "F:\\Gradido\\gradido_local\\login_server\\src\\cpsp\\adminGroups.cpsp" responseStream << ( group_model->getDescription()); responseStream << "
\n"; responseStream << "\t\t\t\t
\n"; responseStream << "\t\t\t"; -#line 66 "F:\\Gradido\\gradido_login_server\\src\\cpsp\\adminGroups.cpsp" +#line 69 "F:\\Gradido\\gradido_local\\login_server\\src\\cpsp\\adminGroups.cpsp" } responseStream << "\n"; responseStream << "\t\t
\n"; responseStream << "\t
\n"; @@ -192,15 +198,17 @@ void AdminGroupsPage::handleRequest(Poco::Net::HTTPServerRequest& request, Poco: responseStream << "\t\t\t\n"; responseStream << "\t\t\t\n"; responseStream << "\t\t\t\n"; + responseStream << "\t\t\t\n"; + responseStream << "\t\t\t\n"; responseStream << "\t\t\t\n"; responseStream << "\t\t\t\n"; responseStream << "\t\t\t\n"; responseStream << "\t\t\t\n"; responseStream << "\t\t\t\n"; responseStream << "\t\n"; @@ -212,14 +220,14 @@ void AdminGroupsPage::handleRequest(Poco::Net::HTTPServerRequest& request, Poco: responseStream << " \n"; responseStream << "
\n"; responseStream << " "; -#line 6 "F:\\Gradido\\gradido_login_server\\src\\cpsp\\footer.cpsp" +#line 6 "F:\\Gradido\\gradido_local\\login_server\\src\\cpsp\\footer.cpsp" responseStream << ( mTimeProfiler.string() ); responseStream << "\n"; responseStream << "
\n"; responseStream << "
\n"; responseStream << "

Login Server in Entwicklung

\n"; responseStream << "

Alpha "; -#line 10 "F:\\Gradido\\gradido_login_server\\src\\cpsp\\footer.cpsp" +#line 10 "F:\\Gradido\\gradido_local\\login_server\\src\\cpsp\\footer.cpsp" responseStream << ( ServerConfig::g_versionString ); responseStream << "

\n"; responseStream << "
\n"; diff --git a/login_server/src/cpp/controller/Group.cpp b/login_server/src/cpp/controller/Group.cpp index 43285abb3..0cf04e39e 100644 --- a/login_server/src/cpp/controller/Group.cpp +++ b/login_server/src/cpp/controller/Group.cpp @@ -15,9 +15,9 @@ namespace controller { } - Poco::AutoPtr Group::create(const std::string& alias, const std::string& name, const std::string& url, const std::string& home, const std::string& description) + Poco::AutoPtr Group::create(const std::string& alias, const std::string& name, const std::string& url, const std::string& host, const std::string& home, const std::string& description) { - auto db = new model::table::Group(alias, name, url, home, description); + auto db = new model::table::Group(alias, name, url, host, home, description); auto group = new Group(db); return Poco::AutoPtr(group); } @@ -51,25 +51,9 @@ namespace controller { { auto db = new model::table::Group(); std::vector group_list; - // throw an unresolved external symbol error - //group_list = db->loadAllFromDB(); - // work around for not working call to loadAllFromDB - auto cm = ConnectionManager::getInstance(); - auto session = cm->getConnection(CONNECTION_MYSQL_LOGIN_SERVER); - Poco::Data::Statement select(session); - - select << "SELECT id, alias, name, url, home, description FROM " << db->getTableName() - , Poco::Data::Keywords::into(group_list); - - size_t resultCount = 0; - try { - resultCount = select.execute(); - } - catch (Poco::Exception& ex) { - printf("[Group::listAll] poco exception: %s\n", ex.displayText().data()); - } - // work around end + group_list = db->loadAllFromDB(); + std::vector> resultVector; resultVector.reserve(group_list.size()); @@ -94,7 +78,11 @@ namespace controller { } } auto model = getModel(); - return JsonRequest(model->getUrl(), port); + std::string request_url = model->getHost(); + if ("" == request_url) { + request_url = model->getUrl(); + } + return JsonRequest(request_url, port); } std::string Group::getHost() diff --git a/login_server/src/cpp/controller/Group.h b/login_server/src/cpp/controller/Group.h index 3f084acd4..b1061b82c 100644 --- a/login_server/src/cpp/controller/Group.h +++ b/login_server/src/cpp/controller/Group.h @@ -16,7 +16,7 @@ namespace controller { ~Group(); - static Poco::AutoPtr create(const std::string& alias, const std::string& name, const std::string& url, const std::string& home, const std::string& description); + static Poco::AutoPtr create(const std::string& alias, const std::string& name, const std::string& url, const std::string& host, const std::string& home, const std::string& description); static std::vector> load(const std::string& alias); static Poco::AutoPtr load(int id); diff --git a/login_server/src/cpp/lib/JsonRequest.cpp b/login_server/src/cpp/lib/JsonRequest.cpp index 2af0a2039..c20c69898 100644 --- a/login_server/src/cpp/lib/JsonRequest.cpp +++ b/login_server/src/cpp/lib/JsonRequest.cpp @@ -136,6 +136,8 @@ JsonRequestReturn JsonRequest::request(const char* methodName, const Poco::JSON: } catch (Poco::Exception& e) { addError(new ParamError(functionName, "connect error to php server", e.displayText().data())); + addError(new ParamError(functionName, "host", mServerHost)); + addError(new ParamError(functionName, "port", mServerPort)); sendErrorsAsEmail(); return JSON_REQUEST_CONNECT_ERROR; } diff --git a/login_server/src/cpp/model/table/Group.cpp b/login_server/src/cpp/model/table/Group.cpp index 9e4a6af66..3f9cb696c 100644 --- a/login_server/src/cpp/model/table/Group.cpp +++ b/login_server/src/cpp/model/table/Group.cpp @@ -8,15 +8,16 @@ namespace model { { } - Group::Group(const std::string& alias, const std::string& name, const std::string& url, const std::string& home, const std::string& description) - : mAlias(alias), mName(name), mUrl(url), mHome(home), mDescription(description) + Group::Group(const std::string& alias, const std::string& name, const std::string& url, const std::string& host, const std::string& home, const std::string& description) + : mAlias(alias), mName(name), mUrl(url), mHost(host), mHome(home), mDescription(description) { } Group::Group(GroupTuple tuple) : ModelBase(tuple.get<0>()), - mAlias(tuple.get<1>()), mName(tuple.get<2>()), mUrl(tuple.get<3>()), mHome(tuple.get<4>()), mDescription(tuple.get<5>()) + mAlias(tuple.get<1>()), mName(tuple.get<2>()), mUrl(tuple.get<3>()), + mHost(tuple.get<4>()), mHome(tuple.get<5>()), mDescription(tuple.get<6>()) { } @@ -32,6 +33,7 @@ namespace model { ss << "Alias: " << mAlias << std::endl; ss << "Name: " << mName << std::endl; ss << "Url: " << mUrl << std::endl; + ss << "Host: " << mHost << std::endl; ss << "Home: " << mHome << std::endl; ss << "Description:" << mDescription << std::endl; return ss.str(); @@ -41,9 +43,9 @@ namespace model { { Poco::Data::Statement select(session); - select << "SELECT id, alias, name, url, home, description FROM " << getTableName() + select << "SELECT id, alias, name, url, host, home, description FROM " << getTableName() << " where " << fieldName << " = ?" - , into(mID), into(mAlias), into(mName), into(mUrl), into(mHome), into(mDescription); + , into(mID), into(mAlias), into(mName), into(mUrl), into(mHost), into(mHome), into(mDescription); return select; } @@ -52,7 +54,7 @@ namespace model { { Poco::Data::Statement select(session); - select << "SELECT id, alias, name, url, home, description FROM " << getTableName(); + select << "SELECT id, alias, name, url, host, home, description FROM " << getTableName(); return select; } @@ -61,7 +63,7 @@ namespace model { { Poco::Data::Statement select(session); // typedef Poco::Tuple, int> UserTuple; - select << "SELECT id, alias, name, url, home, description FROM " << getTableName() + select << "SELECT id, alias, name, url, host, home, description FROM " << getTableName() << " where " << fieldName << " LIKE ?"; return select; @@ -84,8 +86,8 @@ namespace model { Poco::ScopedLock _lock(mWorkMutex); insert << "INSERT INTO " << getTableName() - << " (alias, name, url, home, description) VALUES(?,?,?,?,?)" - , use(mAlias), use(mName), use(mUrl), use(mHome), use(mDescription); + << " (alias, name, url, host, home, description) VALUES(?,?,?,?,?,?)" + , use(mAlias), use(mName), use(mUrl), use(mHost), use(mHome), use(mDescription); return insert; } diff --git a/login_server/src/cpp/model/table/Group.h b/login_server/src/cpp/model/table/Group.h index 5feb8ba14..8e0c56e40 100644 --- a/login_server/src/cpp/model/table/Group.h +++ b/login_server/src/cpp/model/table/Group.h @@ -7,13 +7,13 @@ namespace model { namespace table { - typedef Poco::Tuple GroupTuple; + typedef Poco::Tuple GroupTuple; class Group : public ModelBase { public: Group(); - Group(const std::string& alias, const std::string& name, const std::string& url, const std::string& home, const std::string& description); + Group(const std::string& alias, const std::string& name, const std::string& url, const std::string& host, const std::string& home, const std::string& description); Group(GroupTuple userTuple); ~Group(); @@ -25,11 +25,13 @@ namespace model { inline const std::string& getName() const { std::shared_lock _lock(mSharedMutex); return mName; } inline const std::string& getDescription() const { std::shared_lock _lock(mSharedMutex); return mDescription; } inline const std::string& getUrl() const { std::shared_lock _lock(mSharedMutex); return mUrl; } + inline const std::string& getHost() const { SHARED_LOCK; return mHost; } inline const std::string& getHome() const { SHARED_LOCK; return mHome; } inline void setName(const std::string& name) { std::unique_lock _lock(mSharedMutex); mName = name; } inline void setDescription(const std::string& desc) { std::unique_lock _lock(mSharedMutex); mDescription = desc; } inline void setUrl(const std::string& url) { std::unique_lock _lock(mSharedMutex); mUrl = url; } + inline void setHost(const std::string& host) { UNIQUE_LOCK; mHost = host; } inline void setHome(const std::string& home) { UNIQUE_LOCK; mHome = home; } protected: @@ -42,6 +44,7 @@ namespace model { std::string mAlias; std::string mName; std::string mUrl; + std::string mHost; std::string mHome; std::string mDescription; diff --git a/login_server/src/cpp/model/table/User.cpp b/login_server/src/cpp/model/table/User.cpp index 91cfbf7f1..0a69ac324 100644 --- a/login_server/src/cpp/model/table/User.cpp +++ b/login_server/src/cpp/model/table/User.cpp @@ -421,6 +421,7 @@ namespace model { userObj.set("created", createTimeStamp.raw() / createTimeStamp.resolution()); userObj.set("email_checked", mEmailChecked); userObj.set("ident_hash", DRMakeStringHash(mEmail.data(), mEmail.size())); + userObj.set("language", mLanguageKey); userObj.set("disabled", mDisabled); try { userObj.set("role", UserRole::typeToString(getRole())); diff --git a/login_server/src/cpsp/adminGroups.cpsp b/login_server/src/cpsp/adminGroups.cpsp index 64df38205..a894c23ac 100644 --- a/login_server/src/cpsp/adminGroups.cpsp +++ b/login_server/src/cpsp/adminGroups.cpsp @@ -25,6 +25,7 @@ alias, form.get("group-name", ""), form.get("group-url", ""), + form.get("group-host", ""), form.get("group-home", ""), form.get("group-desc", "") ); @@ -50,6 +51,7 @@
Name
Alias
Url
+
Host
Home
<%= gettext("Description") %>
@@ -60,6 +62,7 @@
<%= group_model->getName() %>
<%= group_model->getAlias() %>
<%= group_model->getUrl() %>
+
<%= group_model->getHost() %>
<%= group_model->getHome() %>
<%= group_model->getDescription()%>
@@ -77,6 +80,8 @@ + + diff --git a/mariadb/Dockerfile b/mariadb/Dockerfile index abfc45d1d..cae6b07f4 100644 --- a/mariadb/Dockerfile +++ b/mariadb/Dockerfile @@ -13,9 +13,11 @@ COPY ./mariadb/setup_dbs.sql a_setup_dbs.sql # login server db COPY ./login_server/skeema/ . RUN cd ./gradido_login/ && for f in *.sql; do cp -- "$f" "../b_$f"; sed -i '1i use gradido_login;' "../b_$f"; done +COPY ./configs/login_server/setup_db_tables ./gradido_login/insert RUN cd ./gradido_login/insert && for f in *.sql; do cp -- "$f" "../../c_$f"; sed -i '1i use gradido_login;' "../../c_$f"; done # community server db -COPY ./community_server/skeema/ . +COPY ./community_server/db/skeema/ . RUN cd ./gradido_community/ && for f in *.sql; do cp -- "$f" "../d_$f"; sed -i '1i use gradido_community;' "../d_$f"; done +COPY ./community_server/db/setup_db_tables ./gradido_community/insert RUN cd ./gradido_community/insert && for f in *.sql; do cp -- "$f" "../../e_$f"; sed -i '1i use gradido_community;' "../../e_$f"; done diff --git a/mariadb/setup_dbs_different_user.sh b/mariadb/setup_dbs_different_user.sh index d362a1971..604276ef3 100755 --- a/mariadb/setup_dbs_different_user.sh +++ b/mariadb/setup_dbs_different_user.sh @@ -54,7 +54,7 @@ skeema push -p$LOGIN_DB_PASSWD cd ../../.. # populate db of community-server -cd community_server/skeema +cd community_server/db/skeema sudo cat << EOF > .skeema [production] flavor=mariadb:10.3.25 diff --git a/skeema/Dockerfile b/skeema/Dockerfile index 8c921ba23..edb908daa 100644 --- a/skeema/Dockerfile +++ b/skeema/Dockerfile @@ -22,7 +22,7 @@ WORKDIR ${DOCKER_WORKDIR} COPY ./skeema/.skeema . COPY ./login_server/skeema/ . COPY ./mariadb/.skeema.login ./gradido_login/.skeema -COPY ./community_server/skeema/ . +COPY ./community_server/db/skeema/ . COPY ./mariadb/.skeema.community ./gradido_community/.skeema CMD skeema push \ No newline at end of file