Commit Graph

786 Commits

Author SHA1 Message Date
Girish Ramakrishnan bf1e217144 Make updates go through the installer
Fixes #114
2014-11-20 22:20:35 -08:00
Girish Ramakrishnan b81a431dcd Keep install server running after install/restore
Part of #114
2014-11-20 20:15:50 -08:00
Girish Ramakrishnan 6cfb1ba949 Move requireAdmin in user routes 2014-11-20 16:59:17 -08:00
Girish Ramakrishnan 3807e98f6a Print update args 2014-11-20 16:59:17 -08:00
Girish Ramakrishnan aefb1f1c07 Updater needs to pass the version instead of revision 2014-11-20 16:57:07 -08:00
Girish Ramakrishnan 63c775b0ae Provision the box using version instead of revision
This allows the installer to be more cognizant of version specific
values if required (like imageId)
2014-11-12 21:53:32 -08:00
Girish Ramakrishnan 5c8207a9e5 digitalocean requires imageId to be number
From the docs, "number (if using an image ID), or String (if using a public image slug)"
2014-11-12 19:12:30 -08:00
Girish Ramakrishnan 0e5563c3ff Fix test name 2014-11-12 13:15:32 -08:00
Girish Ramakrishnan e07ee3e3c8 Do not validate username and password during verification 2014-11-07 21:47:01 -08:00
Girish Ramakrishnan 7f00334437 Handle NOT_FOUND errors 2014-11-07 21:38:15 -08:00
Girish Ramakrishnan 8edcdfb6ea Actually verify password
Fixes #113
2014-11-07 21:30:16 -08:00
Girish Ramakrishnan ec35fcb9a8 Move requirePassword middleware to routes.user 2014-11-07 20:59:25 -08:00
Girish Ramakrishnan 91fa0559f2 Validate new password 2014-11-07 06:32:01 -08:00
Girish Ramakrishnan 9d3199527b Add asserts 2014-11-07 06:27:53 -08:00
Girish Ramakrishnan 08111210a1 Make some TODOs as FIXME 2014-11-06 23:27:14 -08:00
Girish Ramakrishnan 729024b9d8 Convert location to lower case 2014-11-06 23:24:02 -08:00
Girish Ramakrishnan dea72b786e Make a TODO out of a FIXME 2014-11-06 23:22:53 -08:00
Girish Ramakrishnan 8c6a4eceb3 Handle possible errors in commit and rollback 2014-11-06 23:15:56 -08:00
Girish Ramakrishnan 87a8f819c6 Add test to check conflicting location fails 2014-11-06 22:58:48 -08:00
Girish Ramakrishnan ade8ccd90a Remove vbox port bindings forwarding when stopping container 2014-11-06 19:18:17 -08:00
Girish Ramakrishnan 0bb9c321bd Remove VBox forwarding when unconfiguring nginx 2014-11-06 19:12:47 -08:00
Girish Ramakrishnan 967981838f Fix REST response codes
200 - OK
201 - Created (immediately)
202 - Accepted (for future)
204 - Empty response, action done

Fixes #89
2014-11-06 18:44:49 -08:00
Girish Ramakrishnan 437d224994 Use validator to validate email 2014-11-06 17:54:49 -08:00
Girish Ramakrishnan c803f66e9a coding style 2014-11-06 17:06:02 -08:00
Girish Ramakrishnan 0165fb412a ARGUMENTS -> BAD_FIELD 2014-11-06 17:02:07 -08:00
Girish Ramakrishnan ed07894c18 Add validation for username and password 2014-11-06 16:53:25 -08:00
Girish Ramakrishnan f9de936e7f Add asserts 2014-11-06 11:52:02 -08:00
Girish Ramakrishnan 250b23b7c1 validate restrictAccessTo 2014-11-06 11:48:38 -08:00
Girish Ramakrishnan 0d938c0d74 Fix error handling 2014-11-06 11:26:50 -08:00
Girish Ramakrishnan b25a9767ef Add test to verify that invalid json does not crash server
express ensures that req.body is { } with invalid json

If not, we have to check assert(body && typeof body === 'object').
This is because typeof null is 'object'.
2014-11-06 09:47:11 -08:00
Girish Ramakrishnan 43aba840a9 Add missing require 2014-11-06 09:41:47 -08:00
Girish Ramakrishnan 92fdc2c84d Check body param type in apps.configure 2014-11-06 09:36:44 -08:00
Girish Ramakrishnan aa585dc4f0 Check the data type of values in the post request 2014-11-06 09:34:48 -08:00
Girish Ramakrishnan fa58516421 Fixup Error classes 2014-11-06 06:50:16 -08:00
Girish Ramakrishnan 5c77d82335 Move to string based error codes 2014-11-05 22:00:42 -08:00
Girish Ramakrishnan 0205e6cfa1 Fix DatabaseError to take errorOrMessage 2014-11-05 15:54:31 -08:00
Girish Ramakrishnan 86c36efcf8 Call callback on error 2014-11-05 14:58:33 -08:00
Girish Ramakrishnan 1fb701ba23 Fix routes/* error handling 2014-11-05 14:50:30 -08:00
Girish Ramakrishnan 48b51e1190 Fix routes/apps error handling 2014-11-05 14:30:31 -08:00
Girish Ramakrishnan a393fda9e0 Use instanceOf instead of util.inherits 2014-11-05 14:27:47 -08:00
Girish Ramakrishnan aa968f903f Change assert pattern coding style 2014-11-05 14:07:50 -08:00
Girish Ramakrishnan c311d48310 Volumes code has been moved out of box 2014-11-05 14:03:52 -08:00
Girish Ramakrishnan fc86bb2262 boxupdate route has been renamed in appstore 2014-11-05 09:45:55 -08:00
Girish Ramakrishnan 9306a7a127 Fix error handling
Express uses res.status. HttpSuccess and HttpError now use the same property
instead of statusCode

HttpError now requires an error object or string as second argument

HttpError now marks all calls with error object as internal errors

Everything else should have a proper message anyway (giving proper
contextual information). This way we don't leak random app information
through our REST API.

HttpSuccess has optional body

204 does not require a body
2014-11-04 15:29:31 -08:00
Girish Ramakrishnan 399d836c18 Better debug messages 2014-11-04 11:31:29 -08:00
Girish Ramakrishnan a6ea73d41a initialize passport explicitly 2014-11-04 11:06:04 -08:00
Girish Ramakrishnan 07e5dc145d Move syncer code to separate repository 2014-11-04 09:30:02 -08:00
Girish Ramakrishnan 2249da603b Do not dns mail records in test mode 2014-11-04 09:30:01 -08:00
Girish Ramakrishnan 9f09f8e7a8 Pass boxVersionsUrl to update script 2014-11-03 22:47:39 -08:00
Girish Ramakrishnan e7fdaac4a1 token is already set when cloudron runs 2014-11-03 22:39:14 -08:00