From c10382e0ad88a13593b8831d222e83564291fcfc Mon Sep 17 00:00:00 2001 From: mboczko Date: Thu, 22 Jun 2017 03:16:47 -0300 Subject: [PATCH 1/6] database initialization corrected --- app/Global.scala | 363 +++++++++++------- app/controllers/Application.scala | 8 +- app/controllers/IAPI/APIv1.scala | 9 +- app/controllers/LoginPage.scala | 2 +- app/controllers/Registration.scala | 2 +- app/models/LogModel.scala | 11 +- app/models/UserModel.scala | 10 +- app/securesocial/core/SecureSocial.scala | 2 +- app/securesocial/core/SocialUser.scala | 4 +- .../core/UsernamePasswordProvider.scala | 1 + app/views/_global_chrome.scala.html | 2 +- app/views/content/_chrome.scala.html | 20 +- app/views/content/index.scala.html | 13 +- app/views/exchange/_chrome.scala.html | 1 + app/views/exchange/contract.scala.html | 59 +++ app/views/exchange/history.scala.html | 2 + conf/application.conf | 4 +- ...country_settings.conf => br_settings.conf} | 14 +- conf/dev/default_country_settings.conf | 137 +++++++ conf/evolutions/default/2.sql | 5 +- conf/evolutions/default/4.sql | 2 - public/js/history.js | 1 + 22 files changed, 485 insertions(+), 187 deletions(-) rename conf/dev/{country_settings.conf => br_settings.conf} (90%) create mode 100644 conf/dev/default_country_settings.conf diff --git a/app/Global.scala b/app/Global.scala index 3b9253c..69c22fb 100644 --- a/app/Global.scala +++ b/app/Global.scala @@ -10,34 +10,37 @@ import anorm._ package object globals { - def settings(country: Option[String], key: String, data_type: Integer = 2): Any = { - Logger.warn("Your message key:%s option:%s type: %s".format(key, country.getOrElse("NONE!"), data_type)) + def settings(country: String, key: String, data_type: Integer = 2): Any = { if (data_type == 0) { // Boolean - val return_variable0 = Play.current.configuration.getBoolean(country.get.concat(".").concat(key)).getOrElse(false) - if ((return_variable0).getClass == (false).getClass && !(return_variable0 == false && Play.current.configuration.getBoolean(country.get.concat(".").concat(key)).getOrElse(true))) + val return_variable0 = Play.current.configuration.getBoolean(country.concat(".").concat(key)).getOrElse(false) + if ((return_variable0).getClass == (false).getClass && !(return_variable0 == false && Play.current.configuration.getBoolean(country.concat(".").concat(key)).getOrElse(true))) return return_variable0 - else - return "error" + else { + Logger.warn("Error on country-setting key. Country: %s, Key: %s, Type: boolean".format(country, key)) + return false + } } if (data_type == 1) { // Double - val return_variable1 = Play.current.configuration.getDouble(country.get.concat(".").concat(key)).getOrElse(-1.01) + val return_variable1 = Play.current.configuration.getDouble(country.concat(".").concat(key)).getOrElse(-1.01) if ((return_variable1).getClass == (0.1).getClass && return_variable1 != -1.01) return return_variable1 - else - return "error" + else { + Logger.warn("Error on country-setting key. Country: %s, Key: %s, Type: double".format(country, key)) + return -1.01 + } } if (data_type == 2) { // String - val return_variable2 = Play.current.configuration.getString(country.get.concat(".").concat(key)).getOrElse("Not Set") + val return_variable2 = Play.current.configuration.getString(country.concat(".").concat(key)).getOrElse("Not Set") if ((return_variable2).getClass == ("oi").getClass && return_variable2 != "Not Set") return return_variable2 - else - return "error" + else { + Logger.warn("Error on country-setting key. Country: %s, Key: %s, Type: string".format(country, key)) + return "Not Set" + } } - if (key == "country_fee_deposit_percent") - return key.concat(" ") return key.concat(" ") } @@ -45,98 +48,198 @@ package object globals { val masterDBWallet = "wallet" val masterDBTrusted = "trust" - try { - val br_initial_capital_d = settings(Option("br"), "country_system_initial_crypto_capital", 1).asInstanceOf[Double] - val br_local_administrator_s = settings(Option("br"), "country_local_administrator", 2).asInstanceOf[String] - val br_global_administrator_s = settings(Option("br"), "country_global_administrator", 2).asInstanceOf[String] - val br_partner1_account_s = settings(Option("br"), "country_partner1_account").asInstanceOf[String] - val br_partner2_account_s = settings(Option("br"), "country_partner2_account").asInstanceOf[String] - val br_partner1_name_s = settings(Option("br"), "country_partner1_name").asInstanceOf[String] - val br_partner1_url_s = settings(Option("br"), "country_partner1_url").asInstanceOf[String] - val br_partner1_info_s = settings(Option("br"), "country_partner1_info").asInstanceOf[String] - val br_partner2_name_s = settings(Option("br"), "country_partner2_name").asInstanceOf[String] - val br_partner2_url_s = settings(Option("br"), "country_partner2_url").asInstanceOf[String] - val br_partner2_info_s = settings(Option("br"), "country_partner2_info").asInstanceOf[String] - - if (Play.current.configuration.getBoolean("meta.devdb").getOrElse(false)) { - DB.withConnection(globals.masterDB)({ implicit c => - SQL""" - begin; - delete from users_name_info; - delete from users_connections; - delete from users_passwords; - delete from users_tfa_secrets; - delete from users_backup_otps; - delete from totp_tokens_blacklist; - delete from event_log; - delete from tokens; - delete from trusted_action_requests; - delete from balances; - delete from orders; - delete from currencies; - delete from users; - delete from image; - - insert into image (image_id, name) values (0, 'null'); - - select currency_insert(1, 'BRL', 'br', 0, 0); - select currency_insert(2, 'USD', 'us', 0, 0); - - insert into users(id, email) values (0, ''); - insert into balances (user_id, currency) select 0, currency from currencies; - update balances set balance = 0, balance_c = ${br_initial_capital_d} where currency = 'BRL' and user_id = 0; - update balances set balance = 0, balance_c = 70000 where currency = 'USD' and user_id = 0; - - select create_user(${br_local_administrator_s}, 'Fada00Fada', true, null, 'en', 'br', true, ''); - select create_user(${br_global_administrator_s}, 'aaa222', true, null, 'en', 'ru', true, ''); - - select create_user(${br_partner1_account_s}, 'aaa222', true, null, 'en', 'fr', true, ''); - select create_user(${br_partner2_account_s}, 'aaa222', true, null, 'en', 'fr', true, ''); - - select insert_as_admin('us', ${br_global_administrator_s}, 'admin_g1'); - select insert_as_admin('us', ${br_local_administrator_s}, 'admin_l1'); - select insert_as_admin('br', ${br_global_administrator_s}, 'admin_g1'); - select insert_as_admin('br', ${br_local_administrator_s}, 'admin_l1'); - select insert_as_admin('br', ${br_local_administrator_s}, 'admin_o1'); - - insert into users_name_info (user_id, first_name, middle_name, last_name, doc1, doc2, doc3, doc4, doc5, ver1, ver2, ver3, ver4, ver5) select id, 'Marcelo', 'Simão', 'Boczko', '999.090.089-98', 'doc_pdf.pdf', 'doc_pdf.pdf', '(12)99324-0988', 'doc5', true, true, true, true, true from users where email=${br_local_administrator_s}; - insert into users_name_info (user_id, first_name, middle_name, last_name, doc1, doc2, doc3, doc4, doc5, ver1, ver2, ver3, ver4, ver5) select id, 'Yura', '', 'Mitrofanov', '097.455.645-09', '140.png', 'doc_38.jpg', '(53)30823-098', 'doc5', false, false, false, true, false from users where email=${br_global_administrator_s}; - insert into users_name_info (user_id, first_name, middle_name, last_name, doc1, doc2, doc3, doc4, doc5, ver1, ver2, ver3, ver4, ver5) select id, ${br_partner1_name_s}, ${br_partner1_url_s}, ${br_partner1_info_s}, '', '', '', '', '', false, false, false, false, false from users where email=${br_partner1_account_s}; - insert into users_name_info (user_id, first_name, middle_name, last_name, doc1, doc2, doc3, doc4, doc5, ver1, ver2, ver3, ver4, ver5) select id, ${br_partner2_name_s}, ${br_partner2_url_s}, ${br_partner2_info_s}, '', '', '', '', '', false, false, false, false, false from users where email=${br_partner2_account_s}; - - insert into users_connections (user_id, bank, agency, account, partner, partner_account) select (select id from users where email=${br_local_administrator_s}), '745', 'Agency B', 'Account B', 'Crypto-Trade.net', 'partner_account@gmail.com'; - insert into users_connections (user_id, bank, agency, account, partner, partner_account) select (select id from users where email=${br_global_administrator_s}), '341', '8788-X', '677.789-9', 'Crypto-Trade.net', ''; - insert into users_connections (user_id, bank, agency, account, partner, partner_account) select (select id from users where email=${br_partner1_account_s}), '', '', '', ${br_partner1_url_s}, ${br_partner1_account_s}; - insert into users_connections (user_id, bank, agency, account, partner, partner_account) select (select id from users where email=${br_partner2_account_s}), '', '', '', ${br_partner2_url_s}, ${br_partner2_account_s}; - - update balances set balance = 1000 where currency = 'BRL' and user_id = (select id from users where email=${br_local_administrator_s}); - update balances set balance = 1000 where currency = 'BRL' and user_id = (select id from users where email=${br_global_administrator_s}); - - select create_user('a', 'a', true, null, 'en', 'us', false, ''); - select create_user('test@hotmail.ru', 'pass01', true, null, 'ru', 'br', false, ''); - select create_user('test@gmail.com', 'pass02', true, null, 'en', 'br', false, ''); - select create_user('test@yahoo.com.br', 'pass03', true, null, 'br', 'br', false, ''); - select create_user('testru@gmail.ru', 'pass04', true, null, 'ru', 'br', false, ''); - - insert into users_name_info (user_id, first_name, middle_name, last_name, doc1, doc2, doc3, doc4, doc5, ver1, ver2, ver3, ver4, ver5) select id, 'Test', 'Test-middle_name', 'Tes-last_name', '', '', '', '', 'doc5', false, false, false, false, false from users where email='test@hotmail.ru'; - insert into users_name_info (user_id, first_name, middle_name, last_name, doc1, doc2, doc3, doc4, doc5, ver1, ver2, ver3, ver4, ver5) select id, 'Test', '', 'last name', '566.432.789-03', 'doc39.jpg', '140.png', '(11)32580-342', 'doc5', false, false, false, true, false from users where email='test@gmail.com'; - insert into users_name_info (user_id, first_name, middle_name, last_name, doc1, doc2, doc3, doc4, doc5, ver1, ver2, ver3, ver4, ver5) select id, 'TestBR', '', 'sobrenome', '', 'doc39.jpg', 'doc_37.JPG', '(15)99707-0000', '', false, false, false, true, false from users where email='test@yahoo.com.br'; - insert into users_name_info (user_id, first_name, middle_name, last_name, doc1, doc2, doc3, doc4, doc5, ver1, ver2, ver3, ver4, ver5) select id, 'TestRU', '', 'skovsk', '343.782.121-34', 'doc_38.jpg', '', '(11)95454-0993', 'doc5', true, true, true, true, false from users where email='testru@gmail.ru'; - insert into users_name_info (user_id, first_name, middle_name, last_name, doc1, doc2, doc3, doc4, doc5, ver1, ver2, ver3, ver4, ver5) select id, 'Aaaaa', 'midA', 'LastA', '333.988.454-08', 'doc_PDF.pdf', 'doc_37.jpg', '(19)23240-434', 'doc5', true, true, true, true, false from users where email='a'; - - insert into users_connections (user_id, bank, agency, account, partner, partner_account) select (select id from users where email='a'), '237', 'Agency A', 'Account A', 'Crypto-Trade.net', 'qwqwqw@ioe.cs'; - insert into users_connections (user_id, bank, agency, account, partner, partner_account) select (select id from users where email='test@yahoo.com.br'), '237', '65665', '00685343-0', '', ''; - insert into users_connections (user_id, bank, agency, account, partner, partner_account) select (select id from users where email='testru@gmail.ru'), '341', '352323-c', '67345-9', '', ''; + //Initiating Database + initiateDatabase() + var initiate_country_as_number = 1 + initiateCountry("br") // Brazil + // @@@ only first ountry works for now... When unique user defined with country then other countries would work + //initiateCountry("dc") // Default Country + temporaryInitiateCountry("dc") + temporaryPopulateDatabase() + + val userModel = new UserModel(masterDB) + val logModel = new LogModel(masterDB) + val engineModel = new EngineModel(masterDB) + val userTrustModel = new UserTrustModel(masterDBTrusted) + + // create UserTrust actor + val userTrustActor = current.configuration.getBoolean("usertrustservice.enabled").getOrElse(false) match { + case true => Some(Akka.system.actorOf(UserTrustService.props(userTrustModel))) + case false => None + } + + def initiateDatabase(): Boolean = { + try { + if (Play.current.configuration.getBoolean("meta.devdb").getOrElse(false)) { + DB.withConnection(globals.masterDB)({ implicit c => + SQL""" + begin; + delete from users_name_info; + delete from users_connections; + delete from users_passwords; + delete from users_tfa_secrets; + delete from users_backup_otps; + delete from totp_tokens_blacklist; + delete from event_log; + delete from tokens; + delete from trusted_action_requests; + delete from balances; + delete from orders; + delete from currencies; + delete from users; + delete from image; + + insert into image (image_id, name) values (0, 'null'); + insert into users(id, email, user_country) values (0, 'system_account', 'dc'); + commit; + """.execute() + }) + } + return true + } catch { + case error: Throwable => + Logger.error(error.toString) + return false + } + } + + def initiateCountry(current_country: String): Boolean = { + val country_code_s = settings(current_country, "country_code", 2).asInstanceOf[String] + val currency_code_s = settings(current_country, "country_currency_code", 2).asInstanceOf[String] + val initial_capital_d = settings(current_country, "country_system_initial_crypto_capital", 1).asInstanceOf[Double] + val local_administrator_s = settings(current_country, "country_local_administrator", 2).asInstanceOf[String] + val global_administrator_s = settings(current_country, "country_global_administrator", 2).asInstanceOf[String] + val partner1_account_s = settings(current_country, "country_partner1_account", 2).asInstanceOf[String] + val partner2_account_s = settings(current_country, "country_partner2_account", 2).asInstanceOf[String] + val partner1_name_s = settings(current_country, "country_partner1_name", 2).asInstanceOf[String] + val partner1_url_s = settings(current_country, "country_partner1_url", 2).asInstanceOf[String] + val partner1_info_s = settings(current_country, "country_partner1_info", 2).asInstanceOf[String] + val partner2_name_s = settings(current_country, "country_partner2_name", 2).asInstanceOf[String] + val partner2_url_s = settings(current_country, "country_partner2_url", 2).asInstanceOf[String] + val partner2_info_s = settings(current_country, "country_partner2_info", 2).asInstanceOf[String] + try { + if (Play.current.configuration.getBoolean("meta.devdb").getOrElse(false)) { + DB.withConnection(globals.masterDB)({ implicit c => + SQL""" + begin; + select currency_insert(${initiate_country_as_number}, ${currency_code_s}, ${country_code_s}, 0, 0); + insert into balances (user_id, currency) select 0, ${currency_code_s}; + update balances set balance = 0, balance_c = ${initial_capital_d} where currency = ${currency_code_s} and user_id = 0; + + select create_user(${local_administrator_s}, 'Fada00Fada', true, null, 'en', 'br', true, ''); + select create_user(${global_administrator_s}, 'aaa222', true, null, 'en', 'ru', true, ''); + + select create_user(${partner1_account_s}, 'aaa222', true, null, 'en', 'fr', true, ''); + select create_user(${partner2_account_s}, 'aaa222', true, null, 'en', 'fr', true, ''); + + select insert_as_admin(${country_code_s}, ${global_administrator_s}, 'admin_g1'); + select insert_as_admin(${country_code_s}, ${local_administrator_s}, 'admin_l1'); + + insert into users_name_info (user_id, first_name, middle_name, last_name, doc1, doc2, doc3, doc4, doc5, ver1, ver2, ver3, ver4, ver5) select id, 'Marcelo', 'Simão', 'Boczko', '999.090.089-98', 'doc_pdf.pdf', 'doc_pdf.pdf', '(12)99324-0988', 'doc5', true, true, true, true, true from users where email=${local_administrator_s}; + insert into users_name_info (user_id, first_name, middle_name, last_name, doc1, doc2, doc3, doc4, doc5, ver1, ver2, ver3, ver4, ver5) select id, 'Yura', '', 'Mitrofanov', '097.455.645-09', '140.png', 'doc_38.jpg', '(53)30823-098', 'doc5', false, false, false, true, false from users where email=${global_administrator_s}; + insert into users_name_info (user_id, first_name, middle_name, last_name, doc1, doc2, doc3, doc4, doc5, ver1, ver2, ver3, ver4, ver5) select id, ${partner1_name_s}, ${partner1_url_s}, ${partner1_info_s}, '', '', '', '', '', false, false, false, false, false from users where email=${partner1_account_s}; + insert into users_name_info (user_id, first_name, middle_name, last_name, doc1, doc2, doc3, doc4, doc5, ver1, ver2, ver3, ver4, ver5) select id, ${partner2_name_s}, ${partner2_url_s}, ${partner2_info_s}, '', '', '', '', '', false, false, false, false, false from users where email=${partner2_account_s}; + + insert into users_connections (user_id, bank, agency, account, partner, partner_account) select (select id from users where email=${local_administrator_s}), '745', 'Agency B', 'Account B', 'Crypto-Trade.net', 'partner_account@gmail.com'; + insert into users_connections (user_id, bank, agency, account, partner, partner_account) select (select id from users where email=${global_administrator_s}), '341', '8788-X', '677.789-9', 'Crypto-Trade.net', ''; + insert into users_connections (user_id, bank, agency, account, partner, partner_account) select (select id from users where email=${partner1_account_s}), '', '', '', ${partner1_url_s}, ${partner1_account_s}; + insert into users_connections (user_id, bank, agency, account, partner, partner_account) select (select id from users where email=${partner2_account_s}), '', '', '', ${partner2_url_s}, ${partner2_account_s}; + + commit; + """.execute() + }) + } + initiate_country_as_number = initiate_country_as_number + 1 + return true + } catch { + case error: Throwable => + Logger.error(error.toString) + return false + } + } + + def temporaryInitiateCountry(current_country: String): Boolean = { + try { + val country_code_s = settings(current_country, "country_code", 2).asInstanceOf[String] + val currency_code_s = settings(current_country, "country_currency_code", 2).asInstanceOf[String] + val initial_capital_d = settings(current_country, "country_system_initial_crypto_capital", 1).asInstanceOf[Double] + val local_administrator_s = settings(current_country, "country_local_administrator", 2).asInstanceOf[String] + val global_administrator_s = settings(current_country, "country_global_administrator", 2).asInstanceOf[String] + val partner1_account_s = settings(current_country, "country_partner1_account", 2).asInstanceOf[String] + val partner2_account_s = settings(current_country, "country_partner2_account", 2).asInstanceOf[String] + val partner1_name_s = settings(current_country, "country_partner1_name", 2).asInstanceOf[String] + val partner1_url_s = settings(current_country, "country_partner1_url", 2).asInstanceOf[String] + val partner1_info_s = settings(current_country, "country_partner1_info", 2).asInstanceOf[String] + val partner2_name_s = settings(current_country, "country_partner2_name", 2).asInstanceOf[String] + val partner2_url_s = settings(current_country, "country_partner2_url", 2).asInstanceOf[String] + val partner2_info_s = settings(current_country, "country_partner2_info", 2).asInstanceOf[String] + if (Play.current.configuration.getBoolean("meta.devdb").getOrElse(false)) { + DB.withConnection(globals.masterDB)({ implicit c => + SQL""" + begin; + select currency_insert(${initiate_country_as_number}, ${currency_code_s}, ${country_code_s}, 0, 0); + insert into balances (user_id, currency) select 0, ${currency_code_s}; + update balances set balance = 0, balance_c = ${initial_capital_d} where currency = ${currency_code_s} and user_id = 0; + + select create_user(${local_administrator_s}, 'Fada00Fada', true, null, 'en', 'br', true, ''); + select create_user(${global_administrator_s}, 'aaa222', true, null, 'en', 'ru', true, ''); + + select create_user(${partner1_account_s}, 'aaa222', true, null, 'en', 'fr', true, ''); + select create_user(${partner2_account_s}, 'aaa222', true, null, 'en', 'fr', true, ''); + select insert_as_admin(${country_code_s}, ${global_administrator_s}, 'admin_g1'); + select insert_as_admin(${country_code_s}, ${local_administrator_s}, 'admin_l1'); commit; - """.execute() - }) + """.execute() + }) + } + initiate_country_as_number = initiate_country_as_number + 1 + return true + } catch { + case error: Throwable => + Logger.error(error.toString) + return false } - } catch { + } - // XXX: any kind of error in the SQL above will cause this cryptic exception: - // org.postgresql.util.PSQLException: Cannot change transaction read-only property in the middle of a transaction. - case error: Throwable => Logger.error(error.toString) + def temporaryPopulateDatabase(): Boolean = { + try { + if (Play.current.configuration.getBoolean("meta.devdb").getOrElse(false)) { + DB.withConnection(globals.masterDB)({ implicit c => + SQL""" + begin; + select insert_as_admin('br', 'mboczko@yahoo.com', 'admin_o1'); + update balances set balance = 5000 where currency = 'BRL' and user_id = (select id from users where email='mboczko@yahoo.com'); + + select create_user('a', 'a', true, null, 'en', 'dc', false, ''); + select create_user('test@hotmail.ru', 'pass01', true, null, 'ru', 'br', false, ''); + select create_user('test@gmail.com', 'pass02', true, null, 'en', 'br', false, ''); + select create_user('test@yahoo.com.br', 'pass03', true, null, 'br', 'br', false, ''); + select create_user('testru@gmail.ru', 'pass04', true, null, 'ru', 'br', false, ''); + + insert into users_name_info (user_id, first_name, middle_name, last_name, doc1, doc2, doc3, doc4, doc5, ver1, ver2, ver3, ver4, ver5) select id, 'Test', 'Test-middle_name', 'Tes-last_name', '', '', '', '', 'doc5', false, false, false, false, false from users where email='test@hotmail.ru'; + insert into users_name_info (user_id, first_name, middle_name, last_name, doc1, doc2, doc3, doc4, doc5, ver1, ver2, ver3, ver4, ver5) select id, 'Test', '', 'last name', '566.432.789-03', 'doc39.jpg', '140.png', '(11)32580-342', 'doc5', false, false, false, true, false from users where email='test@gmail.com'; + insert into users_name_info (user_id, first_name, middle_name, last_name, doc1, doc2, doc3, doc4, doc5, ver1, ver2, ver3, ver4, ver5) select id, 'TestBR', '', 'sobrenome', '', 'doc39.jpg', 'doc_37.JPG', '(15)99707-0000', '', false, false, false, true, false from users where email='test@yahoo.com.br'; + insert into users_name_info (user_id, first_name, middle_name, last_name, doc1, doc2, doc3, doc4, doc5, ver1, ver2, ver3, ver4, ver5) select id, 'TestRU', '', 'skovsk', '343.782.121-34', 'doc_38.jpg', '', '(11)95454-0993', 'doc5', true, true, true, true, false from users where email='testru@gmail.ru'; + insert into users_name_info (user_id, first_name, middle_name, last_name, doc1, doc2, doc3, doc4, doc5, ver1, ver2, ver3, ver4, ver5) select id, 'Aaaaa', 'midA', 'LastA', '333.988.454-08', 'doc_PDF.pdf', 'doc_37.jpg', '(19)23240-434', 'doc5', true, true, true, true, false from users where email='a'; + + insert into users_connections (user_id, bank, agency, account, partner, partner_account) select (select id from users where email='a'), '237', 'Agency A', 'Account A', 'Crypto-Trade.net', 'qwqwqw@ioe.cs'; + insert into users_connections (user_id, bank, agency, account, partner, partner_account) select (select id from users where email='test@yahoo.com.br'), '237', '65665', '00685343-0', '', ''; + insert into users_connections (user_id, bank, agency, account, partner, partner_account) select (select id from users where email='testru@gmail.ru'), '341', '352323-c', '67345-9', '', ''; + + commit; + """.execute() + + }) + } + return true + } catch { + // XXX: any kind of error in the SQL above will cause this cryptic exception: + // org.postgresql.util.PSQLException: Cannot change transaction read-only property in the middle of a transaction. + case error: Throwable => + Logger.error(error.toString) + return false + } } /* @@ -165,71 +268,61 @@ package object globals { */ - val userModel = new UserModel(masterDB) - val logModel = new LogModel(masterDB) - val engineModel = new EngineModel(masterDB) - - val userTrustModel = new UserTrustModel(masterDBTrusted) - def numberFormat(value: AnyVal): String = { - if (settings(Option("br"), "country_decimal_separator").asInstanceOf[String] == ',') + if (settings("dc", "country_decimal_separator").asInstanceOf[String] == ',') return value.toString else return (value.toString).replace('.', ',') } def calculate_local_fee(order_type: String, initial_value: BigDecimal = 0): BigDecimal = { - val percentage = (100 - settings(Option("br"), "country_fees_global_percentage", 1).asInstanceOf[Double]) * 0.01 + val default_country = "dc" // ### Must change to user's country + val percentage = (100 - settings(default_country, "country_fees_global_percentage", 1).asInstanceOf[Double]) * 0.01 var low_value_fee = 0.0 - if (initial_value < settings(Option("br"), "country_minimum_value", 1).asInstanceOf[Double]) { - low_value_fee = settings(Option("br"), "country_minimum_value", 1).asInstanceOf[Double] * 0.02 + if (initial_value < settings(default_country, "country_minimum_value", 1).asInstanceOf[Double]) { + low_value_fee = settings(default_country, "country_minimum_value", 1).asInstanceOf[Double] * 0.02 } if (order_type == "D") { - return initial_value * settings(Option("br"), "country_fee_deposit_percent", 1).asInstanceOf[Double] * 0.01 * percentage + low_value_fee + return initial_value * settings(default_country, "country_fee_deposit_percent", 1).asInstanceOf[Double] * 0.01 * percentage + low_value_fee } else if (order_type == "S") { - return initial_value * settings(Option("br"), "country_fee_send_percent", 1).asInstanceOf[Double] * 0.01 * percentage + return initial_value * settings(default_country, "country_fee_send_percent", 1).asInstanceOf[Double] * 0.01 * percentage } else if (order_type == "S.") { - return initial_value * settings(Option("br"), "country_fee_send_percent", 1).asInstanceOf[Double] * 0.01 * percentage + return initial_value * settings(default_country, "country_fee_send_percent", 1).asInstanceOf[Double] * 0.01 * percentage } else if (order_type == "DCS") { - return initial_value * (settings(Option("br"), "country_fee_deposit_percent", 1).asInstanceOf[Double] + settings(Option("br"), "country_fee_send_percent", 1).asInstanceOf[Double]) * 0.01 * percentage + low_value_fee + return initial_value * (settings(default_country, "country_fee_deposit_percent", 1).asInstanceOf[Double] + settings(default_country, "country_fee_send_percent", 1).asInstanceOf[Double]) * 0.01 * percentage + low_value_fee } else if (order_type == "W") { // withdrawal to a preferential bank - return settings(Option("br"), "country_nominal_fee_withdrawal_preferential_bank", 1).asInstanceOf[Double] + initial_value * settings(Option("br"), "country_fee_withdrawal_percent", 1).asInstanceOf[Double] * 0.01 * percentage + low_value_fee + return settings(default_country, "country_nominal_fee_withdrawal_preferential_bank", 1).asInstanceOf[Double] + initial_value * settings(default_country, "country_fee_withdrawal_percent", 1).asInstanceOf[Double] * 0.01 * percentage + low_value_fee } else if (order_type == "W.") { // withdrawal to a non preferential bank - return settings(Option("br"), "country_nominal_fee_withdrawal_not_preferential_bank", 1).asInstanceOf[Double] + initial_value * settings(Option("br"), "country_fee_withdrawal_percent", 1).asInstanceOf[Double] * 0.01 * percentage + low_value_fee + return settings(default_country, "country_nominal_fee_withdrawal_not_preferential_bank", 1).asInstanceOf[Double] + initial_value * settings(default_country, "country_fee_withdrawal_percent", 1).asInstanceOf[Double] * 0.01 * percentage + low_value_fee } else if (order_type == "RFW") { // withdrawal to a preferential bank - return settings(Option("br"), "country_nominal_fee_withdrawal_preferential_bank", 1).asInstanceOf[Double] + initial_value * (settings(Option("br"), "country_fee_withdrawal_percent", 1).asInstanceOf[Double] + settings(Option("br"), "country_fee_tofiat_percent", 1).asInstanceOf[Double]) * 0.01 * percentage + low_value_fee + return settings(default_country, "country_nominal_fee_withdrawal_preferential_bank", 1).asInstanceOf[Double] + initial_value * (settings(default_country, "country_fee_withdrawal_percent", 1).asInstanceOf[Double] + settings(default_country, "country_fee_tofiat_percent", 1).asInstanceOf[Double]) * 0.01 * percentage + low_value_fee } else if (order_type == "RFW.") { // withdrawal to a non preferential bank - return settings(Option("br"), "country_nominal_fee_withdrawal_preferential_bank", 1).asInstanceOf[Double] + settings(Option("br"), "country_nominal_fee_withdrawal_not_preferential_bank", 1).asInstanceOf[Double] + initial_value * (settings(Option("br"), "country_fee_withdrawal_percent", 1).asInstanceOf[Double] + settings(Option("br"), "country_fee_tofiat_percent", 1).asInstanceOf[Double]) * 0.01 * percentage + low_value_fee + return settings(default_country, "country_nominal_fee_withdrawal_preferential_bank", 1).asInstanceOf[Double] + settings(default_country, "country_nominal_fee_withdrawal_not_preferential_bank", 1).asInstanceOf[Double] + initial_value * (settings(default_country, "country_fee_withdrawal_percent", 1).asInstanceOf[Double] + settings(default_country, "country_fee_tofiat_percent", 1).asInstanceOf[Double]) * 0.01 * percentage + low_value_fee } else if (order_type == "F") { - return initial_value * settings(Option("br"), "country_fee_tofiat_percent", 1).asInstanceOf[Double] * 0.01 * percentage + return initial_value * settings(default_country, "country_fee_tofiat_percent", 1).asInstanceOf[Double] * 0.01 * percentage } else return 0 } def calculate_global_fee(order_type: String, initial_value: BigDecimal = 0): BigDecimal = { - val percentage = settings(Option("br"), "country_fees_global_percentage", 1).asInstanceOf[Double] * 0.01 + val default_country = "dc" //### Must change to user's country + val percentage = settings(default_country, "country_fees_global_percentage", 1).asInstanceOf[Double] * 0.01 if (order_type == "D") { - return initial_value * settings(Option("br"), "country_fee_deposit_percent", 1).asInstanceOf[Double] * 0.01 * percentage + return initial_value * settings(default_country, "country_fee_deposit_percent", 1).asInstanceOf[Double] * 0.01 * percentage } else if (order_type == "S") { - return initial_value * settings(Option("br"), "country_fee_send_percent", 1).asInstanceOf[Double] * 0.01 * percentage + return initial_value * settings(default_country, "country_fee_send_percent", 1).asInstanceOf[Double] * 0.01 * percentage } else if (order_type == "S.") { - return initial_value * settings(Option("br"), "country_fee_send_percent", 1).asInstanceOf[Double] * 0.01 * percentage + return initial_value * settings(default_country, "country_fee_send_percent", 1).asInstanceOf[Double] * 0.01 * percentage } else if (order_type == "DCS") { - return initial_value * (settings(Option("br"), "country_fee_deposit_percent", 1).asInstanceOf[Double] + settings(Option("br"), "country_fee_send_percent", 1).asInstanceOf[Double]) * 0.01 * percentage + return initial_value * (settings(default_country, "country_fee_deposit_percent", 1).asInstanceOf[Double] + settings(default_country, "country_fee_send_percent", 1).asInstanceOf[Double]) * 0.01 * percentage } else if (order_type == "W" || order_type == "W.") { - return initial_value * settings(Option("br"), "country_fee_withdrawal_percent", 1).asInstanceOf[Double] * 0.01 * percentage + return initial_value * settings(default_country, "country_fee_withdrawal_percent", 1).asInstanceOf[Double] * 0.01 * percentage } else if (order_type == "RFW" || order_type == "RFW.") { - return initial_value * (settings(Option("br"), "country_fee_withdrawal_percent", 1).asInstanceOf[Double] + settings(Option("br"), "country_fee_tofiat_percent", 1).asInstanceOf[Double]) * 0.01 * percentage + return initial_value * (settings(default_country, "country_fee_withdrawal_percent", 1).asInstanceOf[Double] + settings(default_country, "country_fee_tofiat_percent", 1).asInstanceOf[Double]) * 0.01 * percentage } else if (order_type == "F") { - return initial_value * settings(Option("br"), "country_fee_tofiat_percent", 1).asInstanceOf[Double] * 0.01 * percentage + return initial_value * settings(default_country, "country_fee_tofiat_percent", 1).asInstanceOf[Double] * 0.01 * percentage } else return 0 } - // create UserTrust actor - val userTrustActor = current.configuration.getBoolean("usertrustservice.enabled").getOrElse(false) match { - case true => Some(Akka.system.actorOf(UserTrustService.props(userTrustModel))) - case false => None - } - } object Global extends GlobalSettings { diff --git a/app/controllers/Application.scala b/app/controllers/Application.scala index 68f173d..3cbe065 100644 --- a/app/controllers/Application.scala +++ b/app/controllers/Application.scala @@ -119,7 +119,7 @@ class Application @Inject() (jsMessagesFactory: JsMessagesFactory, val messagesA var local_fee = 0.1 var global_fee = 0.1 val decimal_separator = globals.settings(securesocial.core.SecureSocial.currentUser.get.user_country, "country_decimal_separator", 2).asInstanceOf[String] - val country_id = securesocial.core.SecureSocial.currentUser.get.user_country.getOrElse("br") + val country_id = securesocial.core.SecureSocial.currentUser.get.user_country request.body.files map { file => val fileName = file.filename @@ -145,7 +145,7 @@ class Application @Inject() (jsMessagesFactory: JsMessagesFactory, val messagesA } local_fee = globals.calculate_local_fee(order_type, initial_value).toDouble global_fee = globals.calculate_global_fee(order_type, initial_value).toDouble - val success = globals.userModel.create_order_with_picture(request.user.id, country_id, order_type, "Op", partner, globals.settings(Option(securesocial.core.SecureSocial.currentUser.get.user_country.getOrElse("br")), "country_currency_code", 2).asInstanceOf[String], initial_value, local_fee, global_fee, "", "", partner_account, fileName, image_id) + val success = globals.userModel.create_order_with_picture(request.user.id, country_id, order_type, "Op", partner, globals.settings(securesocial.core.SecureSocial.currentUser.get.user_country, "country_currency_code", 2).asInstanceOf[String], initial_value, local_fee, global_fee, "", "", partner_account, fileName, image_id) } } Ok(views.html.exchange.dashboard(request.user)) @@ -169,8 +169,6 @@ class Application @Inject() (jsMessagesFactory: JsMessagesFactory, val messagesA val position3 = file.key.substring(position2 + 1, file.key.length).indexOf("|") + position2 + 1 val position4 = file.key.substring(position3 + 1, file.key.length).indexOf("|") + position3 + 1 val decimal_separator = globals.settings(securesocial.core.SecureSocial.currentUser.get.user_country, "country_decimal_separator", 2).asInstanceOf[String] - //val country_id = securesocial.core.SecureSocial.currentUser.get.user_country.getOrElse("br") - // = try { Some(s.toDouble) } catch { case _ => None } processed_value = try { ((file.key.substring(0, position)).replace(decimal_separator, ".")).toDouble } catch { @@ -205,7 +203,7 @@ class Application @Inject() (jsMessagesFactory: JsMessagesFactory, val messagesA val docNumber = file.key val user_id = request.user.id val image_id = controllers.Image.saveImage(file.ref.file.getAbsolutePath, fileName, user_id) - var success = globals.userModel.create_order_with_picture(user_id, securesocial.core.SecureSocial.currentUser.get.user_country.getOrElse("br"), "V", "Op", docNumber, globals.settings(Option(securesocial.core.SecureSocial.currentUser.get.user_country.getOrElse("br")), "country_currency_code", 2).asInstanceOf[String], 0, 0, 0, "", "", "", fileName, image_id) + var success = globals.userModel.create_order_with_picture(user_id, securesocial.core.SecureSocial.currentUser.get.user_country, "V", "Op", docNumber, globals.settings(securesocial.core.SecureSocial.currentUser.get.user_country, "country_currency_code", 2).asInstanceOf[String], 0, 0, 0, "", "", "", fileName, image_id) success = globals.userModel.update_user_doc(user_id, docNumber, image_id, fileName) } Ok(views.html.exchange.dashboard(request.user)) diff --git a/app/controllers/IAPI/APIv1.scala b/app/controllers/IAPI/APIv1.scala index 22a967b..18663b5 100644 --- a/app/controllers/IAPI/APIv1.scala +++ b/app/controllers/IAPI/APIv1.scala @@ -83,7 +83,7 @@ class APIv1 @Inject() (val messagesApi: MessagesApi) extends Controller with sec } def orders_list = SecuredAction(ajaxCall = true)(parse.json) { implicit request => - val country = securesocial.core.SecureSocial.currentUser.get.user_country.getOrElse("br") + val country = securesocial.core.SecureSocial.currentUser.get.user_country val search_criteria = (request.request.body \ "search_criteria").asOpt[String] val search_value = (request.request.body \ "search_value").asOpt[String] val orders_list_info = globals.engineModel.OrderList(Some(request.user.id), country, search_criteria, search_value) @@ -120,7 +120,7 @@ class APIv1 @Inject() (val messagesApi: MessagesApi) extends Controller with sec } def users_list = SecuredAction(ajaxCall = true)(parse.anyContent) { implicit request => - val country = securesocial.core.SecureSocial.currentUser.get.user_country.getOrElse("br") + val country = securesocial.core.SecureSocial.currentUser.get.user_country val users_list_info = globals.engineModel.UsersList(country) Ok(Json.toJson(users_list_info.map({ c => Json.obj( @@ -197,6 +197,7 @@ class APIv1 @Inject() (val messagesApi: MessagesApi) extends Controller with sec Json.obj( "id" -> c.id, "email" -> c.email.getOrElse("").toString, + "user_country" -> c.user_country.getOrElse("").toString, "ip" -> c.ip.getOrElse("").toString, "created" -> c.created.getOrElse(new DateTime(0).toString).toString, "type" -> c.typ.toString @@ -220,7 +221,7 @@ class APIv1 @Inject() (val messagesApi: MessagesApi) extends Controller with sec } def get_admins = SecuredAction(ajaxCall = true)(parse.anyContent) { implicit request => - val admins = globals.engineModel.GetAdmins(securesocial.core.SecureSocial.currentUser.get.user_country.getOrElse("br")) + val admins = globals.engineModel.GetAdmins(securesocial.core.SecureSocial.currentUser.get.user_country) Ok(Json.toJson(admins.map({ c => Json.obj( "admin_g1" -> c._1, @@ -342,7 +343,7 @@ class APIv1 @Inject() (val messagesApi: MessagesApi) extends Controller with sec val agency = (request.request.body \ "agency").asOpt[String] val account = (request.request.body \ "account").asOpt[String] val doc1 = (request.request.body \ "doc1").asOpt[String] - if (globals.userModel.create_order(request.user.id, securesocial.core.SecureSocial.currentUser.get.user_country.getOrElse("br"), order_type, status, partner, globals.settings(securesocial.core.SecureSocial.currentUser.get.user_country, "country_currency_code", 2).asInstanceOf[String], initial_value, Option(local_fee), Option(global_fee), bank, agency, account, doc1)) { + if (globals.userModel.create_order(request.user.id, securesocial.core.SecureSocial.currentUser.get.user_country, order_type, status, partner, globals.settings(securesocial.core.SecureSocial.currentUser.get.user_country, "country_currency_code", 2).asInstanceOf[String], initial_value, Option(local_fee), Option(global_fee), bank, agency, account, doc1)) { Ok(Json.obj()) } else { BadRequest(Json.obj("message" -> Messages("messages.api.error.failedtocreateorder"))) diff --git a/app/controllers/LoginPage.scala b/app/controllers/LoginPage.scala index c9156c7..c73b468 100644 --- a/app/controllers/LoginPage.scala +++ b/app/controllers/LoginPage.scala @@ -76,7 +76,7 @@ class LoginPage @Inject() (val messagesApi: MessagesApi) extends Controller with user <- txbitsUserService.find(authenticator.uid.get) ) yield { Authenticator.delete(authenticator.id) - globals.logModel.logEvent(LogEvent.fromRequest(Some(user.id), Some(user.email), request, LogType.Logout)) + globals.logModel.logEvent(LogEvent.fromRequest(Some(user.id), Some(user.email), Some(user.user_country), request, LogType.Logout)) user } val result = Redirect(to).discardingCookies(Authenticator.discardingCookie) diff --git a/app/controllers/Registration.scala b/app/controllers/Registration.scala index f7a95a4..f82e054 100644 --- a/app/controllers/Registration.scala +++ b/app/controllers/Registration.scala @@ -176,7 +176,7 @@ class Registration @Inject() (val messagesApi: MessagesApi) extends Controller w if (UsernamePasswordProvider.sendWelcomeEmail) { Mailer.sendWelcomeEmail(user) } - globals.logModel.logEvent(LogEvent.fromRequest(Some(user.id), Some(user.email), request, LogType.SignupSuccess)) + globals.logModel.logEvent(LogEvent.fromRequest(Some(user.id), Some(user.email), Some(user.user_country), request, LogType.SignupSuccess)) if (UsernamePasswordProvider.signupSkipLogin) { completePasswordAuth(user.id, user.email) } else { diff --git a/app/models/LogModel.scala b/app/models/LogModel.scala index 05b664c..a73e5ce 100644 --- a/app/models/LogModel.scala +++ b/app/models/LogModel.scala @@ -51,15 +51,15 @@ object LogType extends Enumeration { }*/ } -case class LogEvent(uid: Option[Long], email: Option[String], ip: Option[String], browser_headers: Option[String], browser_id: Option[String], ssl_info: Option[String], created: Option[DateTime], typ: LogType) +case class LogEvent(uid: Option[Long], email: Option[String], user_country: Option[String], ip: Option[String], browser_headers: Option[String], browser_id: Option[String], ssl_info: Option[String], created: Option[DateTime], typ: LogType) object LogEvent { implicit val logEventWrites = Json.writes[LogEvent] - def fromRequest(uid: Option[Long], email: Option[String], request: RequestHeader, typ: LogType) = { - LogEvent(uid, email, Some(LogModel.ipFromRequest(request)), Some(LogModel.headersFromRequest(request)), None, None, None, typ) + def fromRequest(uid: Option[Long], email: Option[String], user_country: Option[String], request: RequestHeader, typ: LogType) = { + LogEvent(uid, email, user_country, Some(LogModel.ipFromRequest(request)), Some(LogModel.headersFromRequest(request)), None, None, None, typ) } } -case class LoginEvent(id: Long, email: Option[String], ip: Option[String], created: Option[DateTime], typ: LogType) +case class LoginEvent(id: Long, email: Option[String], user_country: Option[String], ip: Option[String], created: Option[DateTime], typ: LogType) object LoginEvent { implicit val writes = Json.writes[LoginEvent] @@ -69,7 +69,7 @@ class LogModel(val db: String = "default") { def logEvent(logEvent: LogEvent) = DB.withConnection(db) { implicit c => SQL""" - select * from new_log(${logEvent.uid}, ${logEvent.browser_headers}, ${logEvent.email}, ${logEvent.ssl_info}, ${logEvent.browser_id}, inet(${logEvent.ip}), ${logEvent.typ.toString}) + select * from new_log(${logEvent.uid}, ${logEvent.browser_headers}, ${logEvent.email}, ${logEvent.user_country}, ${logEvent.ssl_info}, ${logEvent.browser_id}, inet(${logEvent.ip}), ${logEvent.typ.toString}) """.execute() } @@ -79,6 +79,7 @@ class LogModel(val db: String = "default") { """().map(row => LoginEvent( row[Long]("id"), row[Option[String]]("email"), + row[Option[String]]("user_country"), row[Option[String]]("ip"), Some(row[DateTime]("created")), LogType.withName(row[Option[String]]("type").getOrElse("other"))) diff --git a/app/models/UserModel.scala b/app/models/UserModel.scala index 71529a4..abb0c9d 100644 --- a/app/models/UserModel.scala +++ b/app/models/UserModel.scala @@ -56,7 +56,7 @@ class UserModel(val db: String = "default") { row[Boolean]("tfa_enabled"), row[Option[String]]("pgp"), row[Boolean]("manualauto_mode"), - row[Option[String]]("user_country"), + row[String]("user_country"), row[Boolean]("docs_verified"), row[Option[String]]("partner"), row[Option[String]]("admin_xx") @@ -95,7 +95,7 @@ class UserModel(val db: String = "default") { row[Option[String]]("pgp"), row[String]("language"), row[Option[Boolean]]("manualauto_mode"), - row[Option[String]]("user_country"), + row[String]("user_country"), row[Option[Boolean]]("docs_verified"), row[Option[String]]("partner")) match { case (Some(id: Long), @@ -106,7 +106,7 @@ class UserModel(val db: String = "default") { pgp: Option[String], language: String, manualauto_mode: Option[Boolean], - user_country: Option[String], + user_country: String, docs_verified: Option[Boolean], partner: Option[String]) => Some(SocialUser(id, email, verification, language, on_mailing_list, tfa_enabled, pgp, manualauto_mode.getOrElse(false), user_country, docs_verified.getOrElse(false), partner)) @@ -127,7 +127,7 @@ class UserModel(val db: String = "default") { row[Option[String]]("pgp"), row[Option[String]]("language"), row[Option[Boolean]]("manualauto_mode"), - row[Option[String]]("user_country"), + row[String]("user_country"), row[Option[Boolean]]("docs_verified"), row[Option[String]]("partner")) match { case (Some(id: Long), @@ -138,7 +138,7 @@ class UserModel(val db: String = "default") { pgp: Option[String], Some(language: String), Some(manualauto_mode: Boolean), - user_country: Option[String], + user_country: String, Some(docs_verified: Boolean), partner: Option[String]) => Some(SocialUser(id, email, verification, language, on_mailing_list, tfa_enabled, pgp, manualauto_mode, user_country, docs_verified, partner)) diff --git a/app/securesocial/core/SecureSocial.scala b/app/securesocial/core/SecureSocial.scala index 03ffc7b..e67e007 100644 --- a/app/securesocial/core/SecureSocial.scala +++ b/app/securesocial/core/SecureSocial.scala @@ -172,7 +172,7 @@ object SecureSocial { case Some(a) => { if (!a.isValid) { Authenticator.delete(a.id) - globals.logModel.logEvent(LogEvent.fromRequest(a.uid, None, request, LogType.SessionExpired)) + globals.logModel.logEvent(LogEvent.fromRequest(a.uid, None, None, request, LogType.SessionExpired)) None } else { Some(a) diff --git a/app/securesocial/core/SocialUser.scala b/app/securesocial/core/SocialUser.scala index 48c4139..6379d14 100644 --- a/app/securesocial/core/SocialUser.scala +++ b/app/securesocial/core/SocialUser.scala @@ -21,7 +21,9 @@ import play.api.libs.json.{ JsValue, Json, JsObject, Writes } /** * An implementation of Identity. Used by SecureSocial to gather user information when users sign up and/or sign in. */ -case class SocialUser(id: Long, email: String, verification: Int, language: String, onMailingList: Boolean, TFAEnabled: Boolean = false, pgp: Option[String] = None, manualauto_mode: Boolean, user_country: Option[String] = None, docs_verified: Boolean, partner: Option[String] = None, admin_xx: Option[String] = None) + +// Next line should not be br but default_country +case class SocialUser(id: Long, email: String, verification: Int, language: String, onMailingList: Boolean, TFAEnabled: Boolean = false, pgp: Option[String] = None, manualauto_mode: Boolean, user_country: String, docs_verified: Boolean, partner: Option[String] = None, admin_xx: Option[String] = None) object SocialUser { implicit def writes = new Writes[SocialUser] { diff --git a/app/securesocial/core/UsernamePasswordProvider.scala b/app/securesocial/core/UsernamePasswordProvider.scala index 28fee13..144f6d1 100644 --- a/app/securesocial/core/UsernamePasswordProvider.scala +++ b/app/securesocial/core/UsernamePasswordProvider.scala @@ -70,6 +70,7 @@ object UsernamePasswordProvider { * * @param uuid the token id * @param email the user email + * // * @param user_country the country that system is to work * @param creationTime the creation time * @param expirationTime the expiration time * @param isSignUp a boolean indicating wether the token was created for a sign up action or not diff --git a/app/views/_global_chrome.scala.html b/app/views/_global_chrome.scala.html index 331217a..b717825 100644 --- a/app/views/_global_chrome.scala.html +++ b/app/views/_global_chrome.scala.html @@ -36,7 +36,7 @@ - + @content diff --git a/app/views/content/_chrome.scala.html b/app/views/content/_chrome.scala.html index 87b1ce3..93df9aa 100644 --- a/app/views/content/_chrome.scala.html +++ b/app/views/content/_chrome.scala.html @@ -51,12 +51,12 @@ } @@ -65,7 +65,7 @@