-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
…pment Shereen purchase equipment
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# Get User Profiles | ||
|
||
> ## Positive case | ||
1. ✅ Receives a GET request in the **/api/userProfile** route | ||
2. ✅ Returns 200 if there are no users in the database and the allusers key exists in NodeCache. | ||
3. ✅ Returns 200 if there are users in the database | ||
|
||
> ## Negative case | ||
1. ✅ Returns error 404 if the API does not exist | ||
2. ✅ Returns 400 if the user doesn't have | ||
getUserProfiles permission | ||
3. ✅ Returns 500 if there are no users in the database and the allusers key doesn't exist in NodeCache | ||
4. ✅ Returns 404 if any error occurs while getting all user profiles | ||
|
||
> ## Edge case |
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# Post User Profile | ||
|
||
> ## Positive case | ||
1. ✅ Receives a POST request in the **/api/userProfile** route | ||
2. ✅ check if user has permissions for **postUserProfile** | ||
3. ✅ check if user has permissions for **addDeleteEditOwners** or if the user role is **owner** | ||
4. ✅ verify if the email address is already in use | ||
5. ✅ check if environment is not dev environment **hgnData_dev** | ||
6. ✅ check if firstname and lastname exist | ||
7. ✅ Save user profile | ||
8. ✅ Returns **200**, with the id of userProfile created | ||
|
||
> ## Negative case | ||
1. ✅ Returns error 404 if the API does not exist | ||
2. ✅ Returns error 403 if the user doesn't have permissions for **postUserProfile** | ||
3. ✅ Returns error 403 if the user doesn't have permissions for **addDeleteEditOwners** and if the user role is an **owner** | ||
4. ✅ Returns error 400 if the email address is already in use | ||
5. ✅ Returns error 400 if in dev environment, the role is owner or administrator and the actual email or password are incorrect | ||
6. ✅ Returns 400 if the firstname and lastname already exist and if no duplicate name is allowed | ||
7. ✅ Returns error 501 if there is an error when trying to create the userProfile | ||
|
||
> ## Edge case | ||
1. ❌ Returns 400 if email is invalid | ||
2. ❌ Returns 400 if password is invalid | ||
3. ❌ Returns 400 if teamcode is invalid |
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,7 @@ | ||
/** | ||
* Unused legacy code. Commented out to avoid confusion. | ||
* Commented by: Shengwei Peng | ||
* Date: 2024-03-22 | ||
*/ | ||
// const eventtypes = { | ||
// ActionCreated: 'Action Created', | ||
// ActionEdited: 'Action Edited', | ||
// ActionDeleted: 'Action Deleted', | ||
// }; | ||
const eventtypes = { | ||
ActionCreated: 'Action Created', | ||
ActionEdited: 'Action Edited', | ||
ActionDeleted: 'Action Deleted', | ||
}; | ||
|
||
// module.exports = eventtypes; | ||
module.exports = eventtypes; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,19 @@ | ||
const URL_TO_BLUE_SQUARE_PAGE = | ||
export const URL_TO_BLUE_SQUARE_PAGE = | ||
'https://www.onecommunityglobal.org/hands-off-administration-policy'; | ||
|
||
// Since the notification banner is blue background, added white color for hyperlink style. | ||
const NEW_USER_BLUE_SQUARE_NOTIFICATION_MESSAGE = ` | ||
<p> Welcome as one of our newest members to the One Community team and family! | ||
Heads up we’ve removed a <a href=${URL_TO_BLUE_SQUARE_PAGE}>“blue square”</a> that | ||
was issued due to not completing your hours and/or summary this past week. The reason we removed | ||
this blue square is because you didn’t have the full week available to complete your volunteer | ||
export const NEW_USER_BLUE_SQUARE_NOTIFICATION_MESSAGE = ` | ||
<p> Welcome as one of our newest members to the One Community team and family! | ||
Heads up we’ve removed a <a href=${URL_TO_BLUE_SQUARE_PAGE}>“blue square”</a> that | ||
was issued due to not completing your hours and/or summary this past week. The reason we removed | ||
this blue square is because you didn’t have the full week available to complete your volunteer | ||
time with us. </p> | ||
<p> If you’d like to learn more about this policy and/or blue squares, click here: | ||
<a href=${URL_TO_BLUE_SQUARE_PAGE}> “Blue Square FAQ”</a> | ||
<p> If you’d like to learn more about this policy and/or blue squares, click here: | ||
<a href=${URL_TO_BLUE_SQUARE_PAGE}> “Blue Square FAQ”</a> | ||
</p> | ||
<p>Welcome again, we’re glad to have you joining us! </p> | ||
<p>With Gratitude,</br>One Community </p> | ||
`; | ||
|
||
module.exports = { | ||
NEW_USER_BLUE_SQUARE_NOTIFICATION_MESSAGE, | ||
URL_TO_BLUE_SQUARE_PAGE, | ||
}; |