Merge lp:~par-hellstrom/forssim/removedGlobalFTPUser into lp:forssim

Proposed by parhe
Status: Merged
Merged at revision: not available
Proposed branch: lp:~par-hellstrom/forssim/removedGlobalFTPUser
Merge into: lp:forssim
Diff against target: None lines
To merge this branch: bzr merge lp:~par-hellstrom/forssim/removedGlobalFTPUser
Reviewer Review Type Date Requested Status
Ulrika Dreifaldt Approve
Review via email: mp+8932@code.launchpad.net
To post a comment you must log in.
Revision history for this message
parhe (par-hellstrom) wrote :

Removed the global ftp user, now new users must be added to the ftp-server in the same way as the sql-server.

Revision history for this message
Ulrika Dreifaldt (ulrika-dreifaldt) wrote :

very good!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'FsWisdom/ApplicationNode.cpp'
2--- FsWisdom/ApplicationNode.cpp 2009-07-16 12:58:12 +0000
3+++ FsWisdom/ApplicationNode.cpp 2009-07-17 11:40:10 +0000
4@@ -167,18 +167,10 @@
5 cout << "databaseIP: " << databaseIP.toStdString() << endl;
6 cout << "databaseName: " << databaseName.toStdString() << endl;
7
8- ftpUser = settings->value(ftpUserKey, "").toString();
9- if (ftpUser == "")
10- settings->setValue(ftpUserKey, "hiq");
11-
12 ftpIP = settings->value(ftpIPKey, "").toString();
13 if (ftpIP == "")
14 settings->setValue(ftpIPKey, "217.151.194.60");
15
16- ftpPassword = settings->value(ftpPasswordKey, "").toString();
17- if (ftpIP == "")
18- settings->setValue(ftpPasswordKey, "hiqhiq");
19-
20 /*Create ftp object. Connection is done in RegisterUser after login.*/
21 ftp.reset(new QFtp(this));
22 connect(ftp.get(), SIGNAL(commandFinished(int, bool)),
23@@ -282,30 +274,6 @@
24 {
25 this->userId = query.value(0).toInt();
26 }
27- /*This is not needed anymore! New users has to ask Forssim mySQL-admin
28- * for username and password.
29- *
30- else
31- {
32- // insert new user
33- QSqlQuery query;
34- query.prepare("INSERT INTO user (name) "
35- "VALUES (:name)");
36- query.bindValue(":name", username);
37-
38- if(!query.exec())
39- throw ApplicationNodeException("Failed to create new user in database");
40-
41- // read user from database
42- query.prepare("select userId from user where name = :name;");
43- query.bindValue(":name",username);
44-
45- if(!query.exec())
46- throw ApplicationNodeException("Failed to read user name from database after reading it");
47-
48- query.next();
49- this->userId = query.value(0).toInt();
50- }*/
51 }
52 else
53 throw ApplicationNodeException("Failed to read user name from database");
54@@ -313,7 +281,7 @@
55
56 /*Login is ok! Download usercases over ftp.*/
57 ftp->connectToHost(ftpIP);
58- ftp->login(ftpUser,ftpPassword);
59+ ftp->login(hashUsername,hashPassword);
60 myCDcommand = ftp->cd("cases");
61
62 /*Ftp download of cases is started when cd command is finished.*/

Subscribers

People subscribed via source and target branches

to all changes: