-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GPII-3921: Update gpii-express-user to use modern dependencies, especially gpii-json-schema. #6
Merged
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
8702af2
GPII-3921: Committed work in progress for discussion.
the-t-in-rtf 015bb40
GPII-3921: Committed work in progress on converted to modern gpii-jso…
the-t-in-rtf 6efdc50
GPII-3921: Updated to fix validation handling early in the error bind…
the-t-in-rtf 403e8ae
GPII-3921: Updated to use newer gpii-json-schema with refactored sche…
the-t-in-rtf fe3f137
GPII-3921: Updated to released version of [email protected].
the-t-in-rtf 836e94c
GPII-3921: Updated to use "schema holder" and "resource loading" in v…
the-t-in-rtf 4c21f06
GPII-3921: Workarounds to confirm functionality using potentia-ii ver…
the-t-in-rtf de1da4c
GPII-3921: Updated to latest potentia-ii-compatible versions of gpii-…
the-t-in-rtf 729acf2
GPII-3921: Updated to latest gpii-handlebars to pick up "prioritsable…
the-t-in-rtf 154a17f
GPII-3921: Updated lingering template directory options arrays.
the-t-in-rtf 150969f
GPII-3921: Brought in newer version of gpii-handlebars with improved …
the-t-in-rtf 226da8d
GPII-3921: Removed unused "global or literal" utility function.
the-t-in-rtf af9ef80
GPII-3921: Updated dependencies.
the-t-in-rtf d3d84c3
GPII-3921: Updated `.vagrant.yml` to fix the chrome/chromedriver mism…
the-t-in-rtf 5356bca
GPII-3921: Updated Vagrant config to install and provision a test ins…
the-t-in-rtf 66644e8
GPII-3921: Ensure that grunt is available to run linting checks in th…
the-t-in-rtf 8c336b3
GPII-3921: Updated additional dependencies.
the-t-in-rtf 6e9141d
GPII-3921: Updating infusion to demonstrate issues with "circular ref…
the-t-in-rtf e82f440
GPII-3921: Fixed typo in `.vagrant.yml` fie.
the-t-in-rtf 7ec477d
GPII-3921: Updated to infusion with resource loader fix.
the-t-in-rtf 5e9b6c2
GPII-3921: Update dependencies following gpii-handlebars/gpii-json-sc…
the-t-in-rtf 55a7a35
GPII-3921: Bypassed one circular dependency issue to demonstrate anot…
the-t-in-rtf 34478ed
GPII-3921: Updated to work with latest FLUID-6145 dev release.
the-t-in-rtf 69e5640
GPII-3921: Updated to full release of [email protected]
the-t-in-rtf bc104fa
GPII-3921: Reverted circular options workaround in schema holder defi…
the-t-in-rtf File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"extends": "eslint-config-fluid" | ||
"extends": "eslint-config-fluid" | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"reporter": ["none"], | ||
"report-dir": "reports", | ||
"temp-dir": "coverage", | ||
"clean": false, | ||
"exclude": ["**/tests/**/*.js"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,6 @@ Returns details about the current user if they are logged in, as in: | |
|
||
```json | ||
{ | ||
"ok": true, | ||
"user": { | ||
"username": "sample", | ||
"email": "[email protected]" | ||
|
@@ -28,13 +27,11 @@ Returns an error message if the user is not currently logged in, as in: | |
|
||
```json | ||
{ | ||
"ok": false, | ||
"isError": true, | ||
"message": "You are not currently logged in." | ||
} | ||
``` | ||
|
||
[Response schema](../schemas/user-message.json) | ||
|
||
### `POST /api/user/login` | ||
|
||
Log a user in. Requires both a `username` and `password`, as in: | ||
|
@@ -46,19 +43,14 @@ Log a user in. Requires both a `username` and `password`, as in: | |
} | ||
``` | ||
|
||
[Request schema](../schemas/user-login.json) | ||
|
||
Returns a confirmation message indicating whether the login was successful, as in: | ||
|
||
```json | ||
{ | ||
"ok": true, | ||
"message": "You are now logged in." | ||
} | ||
``` | ||
|
||
[Response schema](../schemas/user-message.json) | ||
|
||
Note that only users with verified email addresses are allowed to log in. For details, see `GET /api/user/verify/:code` | ||
below. | ||
|
||
|
@@ -68,13 +60,10 @@ Immediately logs the current user out and returns a confirmation message, as in: | |
|
||
```json | ||
{ | ||
"ok": true, | ||
"message": "You are now logged out." | ||
} | ||
``` | ||
|
||
[Response schema](../schemas/user-message.json) | ||
|
||
### `POST /api/user` | ||
|
||
Create a new user. Anyone can create a user, but the account cannot be used until the email address is verified (see | ||
|
@@ -92,19 +81,15 @@ Requires a `username`, valid `password`, and a `confirm` field with the same pas | |
} | ||
``` | ||
|
||
[Request schema](../schemas/user-signup.json) | ||
|
||
Returns a confirmation message indicating whether the response was successful, as in: | ||
|
||
```json | ||
{ | ||
"ok": false, | ||
"isError": true, | ||
"message": "A user with this email address already exists." | ||
} | ||
``` | ||
|
||
[Response schema](../schemas/user-message.json) | ||
|
||
### `GET /api/user/verify/:code` | ||
|
||
When a new account is created, an email is sent to the address associated with the account. The email contains a link | ||
|
@@ -115,13 +100,10 @@ account. A successful response should look something like: | |
|
||
```json | ||
{ | ||
"ok": true, | ||
"message": "Your email address has been verified and you can now use your account to log in." | ||
} | ||
``` | ||
|
||
[Response schema](../schemas/user-message.json) | ||
|
||
### `POST /api/user/verify/resend/:email` | ||
|
||
If a user loses their initial verification email, they can ask for it to be sent again by supplying the `email` address | ||
|
@@ -135,20 +117,14 @@ they used when signing up, as in: | |
|
||
Returns a confirmation message indicating whether the response was successful. | ||
|
||
[Response schema](../schemas/user-message.json) | ||
|
||
### `GET /api/user/forgot/:email` | ||
|
||
Users can request a link that can be used to reset their password. This is a three step process. The first step | ||
(handled by this endpoint) sends a message to the supplied `email` address. For the second step, see `GET | ||
/api/user/reset/:code` below. | ||
|
||
[Request schema](../schemas/user-forgot.json) | ||
|
||
Returns a confirmation message indicating whether the response was successful. | ||
|
||
[Response schema](../schemas/user-message.json) | ||
|
||
### `GET /api/user/reset/:code` | ||
|
||
If a user has requested that their password be reset using the `GET /api/user/forgot/:email` API endpoint (see above), | ||
|
@@ -157,8 +133,6 @@ they will receive an email message that contains a link to this endpoint. | |
By visiting this link, they are presented with a form that will allow them update their password using the `POST | ||
/api/user/reset/:code` endpoint (see below) | ||
|
||
[Response schema](../schemas/user-message.json) | ||
|
||
### `POST /api/user/reset/:code` | ||
|
||
Allows a user to reset their password using a `code` received via email (see `GET /api/user/forgot/:email`). The user | ||
|
@@ -171,12 +145,8 @@ is required to enter a valid `password` and to enter the same password in a `con | |
} | ||
``` | ||
|
||
[Request schema](../schemas/user-reset.json) | ||
|
||
Returns a confirmation of whether the response was successful. | ||
|
||
[Response schema](../schemas/user-message.json) | ||
|
||
## /api/group | ||
|
||
The following endpoints are used to manage groups. All parts of the group API require the user to be an administrator. | ||
|
@@ -185,8 +155,6 @@ The following endpoints are used to manage groups. All parts of the group API r | |
|
||
Displays the group metadata as well as the `username` of all members of `:group`. | ||
|
||
[Response schema](../schemas/group-message.json) | ||
|
||
### `POST /api/group/:group` | ||
|
||
Create a new group named `:group`. A group is required to have a valid (URL-safe) `name`, and may optionally include a | ||
|
@@ -199,18 +167,12 @@ list of `members`, each of which is expected to be valid `username`, as in: | |
} | ||
``` | ||
|
||
[Request schema](../schemas/group-core.json) | ||
|
||
Returns a confirmation of whether the response was successful. | ||
|
||
[Response schema](../schemas/group-message.json) | ||
|
||
### `DELETE /api/group/:group` | ||
|
||
Delete the group named `:group`. Returns a confirmation of whether the response was successful. | ||
|
||
[Response schema](../schemas/group-message.json) | ||
|
||
## /api/memberships | ||
|
||
The following endpoints are used to manage the membership of users in one or more groups. An individual user can only | ||
|
@@ -221,17 +183,11 @@ view their own memberships, using `GET /api/memberships/:username` (see below). | |
Displays a list of group memberships for the given `:username`. If `:username` is omitted, the memberships for the | ||
current user are displayed. For a list of users in a single group, see `GET /api/group/:group` above. | ||
|
||
[Response schema](../schemas/memberships-message.json) | ||
|
||
### `POST /api/memberships/:username/:group` | ||
|
||
Add `:username` to `:group`. Does not expect and will ignore any JSON data you send. Returns a confirmation of whether | ||
the response was successful. | ||
|
||
[Response schema](../schemas/message-core.json) | ||
|
||
### `DELETE /api/memberships/:username/:group` | ||
|
||
Remove `:username` from `:group`. Returns a confirmation of whether the response was successful. | ||
|
||
[Response schema](../schemas/message-core.json) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
(function (fluid) { | ||
"use strict"; | ||
fluid.defaults("gpii.express.user.frontend.errorAwareForm", { | ||
gradeNames: ["gpii.schema.client.errorAwareForm"], | ||
resources: { | ||
modelSchema: { | ||
promiseFunc: "{schemaHolder}.generateSchema" | ||
} | ||
}, | ||
modelSchema: "{that}.model.modelSchema", | ||
model: { | ||
modelSchema: "{that}.resources.modelSchema.parsed" | ||
}, | ||
components: { | ||
schemaHolder: { | ||
type: "gpii.express.user.schemaHolder" | ||
} | ||
} | ||
}); | ||
})(fluid); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now we've moved up to gpii-couchdb-test-harness, could you add the corresponding material to the README to explain to users the options available for running tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bump comment to update readme
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Somehow this was hidden from me by a later version update, just saw the notification via email and followed up. I will leave this open and address ASAP.