diff --git a/docs/config/config.xml b/docs/config/config.xml index 1200d3baedf..6aea60f7685 100644 --- a/docs/config/config.xml +++ b/docs/config/config.xml @@ -20,8 +20,8 @@ %USERNAME% %PASSWORD% %DATABASE% - %USERNAME% - %PASSWORD% + %USERNAME% + %PASSWORD% Example database @@ -43,7 +43,7 @@ - + random diff --git a/docs/deprecated_wiki/Setup/Initial Setup/Behavioural Database/Behavioural-Database.md b/docs/deprecated_wiki/Setup/Initial Setup/Behavioural Database/Behavioural-Database.md index 24c5ee264f5..58ef57fb072 100644 --- a/docs/deprecated_wiki/Setup/Initial Setup/Behavioural Database/Behavioural-Database.md +++ b/docs/deprecated_wiki/Setup/Initial Setup/Behavioural Database/Behavioural-Database.md @@ -277,16 +277,16 @@ The Instrument Manager module is designed allow the Loris database Admin superus To enable upload and installation of `*.linst` instrument files created using the Instrument Builder: -i. **Create a separate MySQL user account with CREATE, SELECT, INSERT, UPDATE and DELETE privileges** on the database. This credential should be stored in `project/config.xml` within the `` tag section as `` and `` : +i. **Create a separate MySQL user account with CREATE, SELECT, INSERT, UPDATE and DELETE privileges** on the database. This credential should be stored in `project/config.xml` within the `` tag section as `` and `` : ```xml ... - %USERNAME% - %PASSWORD% + %USERNAME% + %PASSWORD% ... ``` ii. **Ensure that the project-specific directories are Apache-writeable**: `project/instruments/` and `project/tables_sql/` -**[[NEXT: (4) Imaging Database|Imaging-Database]]** \ No newline at end of file +**[[NEXT: (4) Imaging Database|Imaging-Database]]** diff --git a/modules/instrument_manager/README.md b/modules/instrument_manager/README.md index 5707af9cb3c..f283ed2e3f5 100644 --- a/modules/instrument_manager/README.md +++ b/modules/instrument_manager/README.md @@ -49,5 +49,6 @@ directories (to write the instrument itself, and instrument table patch respectively.) In order to automatically source the SQL patch and fully configure -LINST instruments, the LORIS `quatUser` and `quatPassword` configuration +LINST instruments, the LORIS `adminUser` and `adminPassword` configuration must be set to a user which has the MySQL `CREATE TABLE` permission. + diff --git a/modules/instrument_manager/jsx/instrumentManagerIndex.js b/modules/instrument_manager/jsx/instrumentManagerIndex.js index 83f570899c4..9d475c2bcc0 100644 --- a/modules/instrument_manager/jsx/instrumentManagerIndex.js +++ b/modules/instrument_manager/jsx/instrumentManagerIndex.js @@ -111,7 +111,7 @@ class InstrumentManagerIndex extends Component { return (
Instrument installation is not possible given the current server - configuration; the LORIS 'quatUser' is not configured properly. + configuration; the LORIS 'adminUser' is not configured properly. File upload is still possible but instruments will need to be installed manually
diff --git a/modules/instrument_manager/php/instrument_manager.class.inc b/modules/instrument_manager/php/instrument_manager.class.inc index c815f53608a..2459d4e9295 100644 --- a/modules/instrument_manager/php/instrument_manager.class.inc +++ b/modules/instrument_manager/php/instrument_manager.class.inc @@ -169,7 +169,7 @@ class Instrument_Manager extends \NDB_Menu_Filter * Instead, inform users that an administrator must install it * on their behalf. * This should only happen for users on a system where automatic - * installation is disabled (ie. has no quatUser). + * installation is disabled (ie. has no adminUser). */ return new \LORIS\Http\Response\JSON\Conflict( self::FILE_ALREADY_EXISTS @@ -189,7 +189,7 @@ class Instrument_Manager extends \NDB_Menu_Filter ); if (!$this->isQuatUserConfigured()) { - // If no quatUser is configured, automatic installation is not + // If no adminUser is configured, automatic installation is not // possible, so this is the last step. return (new \LORIS\Http\Response()) ->withStatus(200, 'OK') @@ -224,8 +224,8 @@ class Instrument_Manager extends \NDB_Menu_Filter exec( "mysql". " -h" . escapeshellarg($db_config['host']). - " -u" . escapeshellarg($db_config['quatUser']). - " -p" . escapeshellarg($db_config['quatPassword']). + " -u" . escapeshellarg($db_config['adminUser']). + " -p" . escapeshellarg($db_config['adminPassword']). " " . escapeshellarg($db_config['database']). " < " . $this->path . "project/tables_sql/". escapeshellarg($table_name . '.sql'), @@ -591,21 +591,21 @@ class Instrument_Manager extends \NDB_Menu_Filter } /** - * Return whether the quatUser is properly configured, ie. credentials are + * Return whether the adminUser is properly configured, ie. credentials are * set and are valid. - * The quatUser is a MySQL user with CREATE table permissions. + * The adminUser is a MySQL user with CREATE table permissions. * `empty` is used instead of `isset` as blank values in the config file * are still considered set. * - * @return bool True if a quatUser is configured properly. False if not. + * @return bool True if a adminUser is configured properly. False if not. */ protected function isQuatUserConfigured() : bool { $db = $this->factory->database(); $db_config = $this->factory->config()->getSetting('database'); - $credentials_set = !empty($db_config['quatUser']) - && !empty($db_config['quatPassword']); + $credentials_set = !empty($db_config['adminUser']) + && !empty($db_config['adminPassword']); if (!$credentials_set) { return false; } @@ -615,8 +615,8 @@ class Instrument_Manager extends \NDB_Menu_Filter try { $connected = $db->connect( $db_config['database'], - $db_config['quatUser'], - $db_config['quatPassword'], + $db_config['adminUser'], + $db_config['adminPassword'], $db_config['host'], false ); diff --git a/raisinbread/config/config.xml b/raisinbread/config/config.xml index 5322c2b7381..dbe8e93c350 100644 --- a/raisinbread/config/config.xml +++ b/raisinbread/config/config.xml @@ -20,8 +20,8 @@ %USERNAME% %PASSWORD% %DATABASE% - %USERNAME% - %PASSWORD% + %USERNAME% + %PASSWORD% Example database
diff --git a/test/config.xml b/test/config.xml index 37fa559937c..c709021ae95 100644 --- a/test/config.xml +++ b/test/config.xml @@ -21,8 +21,8 @@ SQLTestUser TestPassword LorisTest - SQLTestUser - TestPassword + SQLTestUser + TestPassword Example database
@@ -39,7 +39,7 @@
- + random diff --git a/tools/exporters/DB_dump_table_data.php b/tools/exporters/DB_dump_table_data.php index 3e7af255c13..083c725d538 100644 --- a/tools/exporters/DB_dump_table_data.php +++ b/tools/exporters/DB_dump_table_data.php @@ -36,13 +36,13 @@ array("dbn"=>$databaseInfo['database']) ); -$dbUser = $databaseInfo["quatUser"]; -$dbPassword = $databaseInfo["quatPassword"]; +$adminUser = $databaseInfo["adminUser"]; +$adminPassword = $databaseInfo["adminPassword"]; $dbHost = $databaseInfo["host"]; -if (empty($dbUser) || empty($dbPassword) || empty($dbHost)) { +if (empty($adminUser) || empty($adminPassword) || empty($dbHost)) { echo "\n\n Some database credentials are missing, please ensure administrator - credentials (quatUser, quatPassword) and a host value are available in your + credentials (adminUser, adminPassword) and a host value are available in your configuration file. \n\n"; die(); } @@ -71,7 +71,7 @@ foreach ($tableNames as $tableName) { $paths = \NDB_Config::singleton()->getSetting('paths'); $filename = $paths['base'] . "/raisinbread/RB_files/RB_$tableName.sql"; - exec('mysqldump -u '.escapeshellarg($dbUser).' -p'.escapeshellarg($dbPassword).' -h '.escapeshellarg($dbHost).' '. + exec('mysqldump -u '.escapeshellarg($adminUser).' -p'.escapeshellarg($adminPassword).' -h '.escapeshellarg($dbHost).' '. escapeshellarg($databaseInfo['database']).' '. '--complete-insert '. '--no-create-db '. diff --git a/tools/single_use/Engine_Change_MyISAM_to_INNODB.php b/tools/single_use/Engine_Change_MyISAM_to_INNODB.php index 13cd716e9f8..e5d9b3567f3 100644 --- a/tools/single_use/Engine_Change_MyISAM_to_INNODB.php +++ b/tools/single_use/Engine_Change_MyISAM_to_INNODB.php @@ -19,8 +19,8 @@ $dbConfig = $config->getSetting("database"); $adminDB = Database::singleton( $dbConfig["database"], - $dbConfig["quatUser"], - $dbConfig["quatPassword"], + $dbConfig["adminUser"], + $dbConfig["adminPassword"], $dbConfig["host"], true );