Amalesh taking over for Jay - Toggle Request Bio Permission#704
Amalesh taking over for Jay - Toggle Request Bio Permission#704Alforoan wants to merge 7 commits intodevelopmentfrom
Conversation
| const isRequestorAuthorized = (!!( | ||
| canRequestorUpdateUser(req.body.requestor.requestorId, userid) && ( | ||
| await hasPermission(req.body.requestor, 'putUserProfile') | ||
| await hasPermission(req.body.requestor, 'putUserProfile')) || await hasPermission(req.body.requestor, 'requestBio') |
There was a problem hiding this comment.
This makes the requestBio permission also able to modify the rest of users' profiles, not just the bioRequested field.
Renanluizssx
left a comment
There was a problem hiding this comment.
see my regiew @Alforoan please in PR#1831:OneCommunityGlobal/HighestGoodNetworkApp#1831
Pandani07
left a comment
There was a problem hiding this comment.
Got an error when testing this PR, posted a review on the frontend PR
|
Hi @Alforoan, I left a comment here- OneCommunityGlobal/HighestGoodNetworkApp#1831 |
XiaohanMeng
left a comment
There was a problem hiding this comment.
Hi, I left my review on the FE project: OneCommunityGlobal/HighestGoodNetworkApp#1831
|
see review on the frontend PR: OneCommunityGlobal/HighestGoodNetworkApp#1831 |
Jingyii800
left a comment
There was a problem hiding this comment.
Hi, while trying to test this feature, I encountered a bug on this backend. Please check in this comment. OneCommunityGlobal/HighestGoodNetworkApp#1831 (review)
chrischenlixing
left a comment
There was a problem hiding this comment.
Check out frontend comment
There was a problem hiding this comment.
Hello, I got an error while reviewing your PR. Please refer this link. OneCommunityGlobal/HighestGoodNetworkApp#1831 (review)
Co-authored-by: Nathan Hoffman <nathanahoffman@gmail.com>
|
Hi Jay, I have been trying to run the backend but I am not able to do that. I get an error that breaks the backend project and it nevers runs. I have attached a video showcasing it. Screen.Recording.2024-03-09.at.9.50.21.PM.mov |
kylepham
left a comment
There was a problem hiding this comment.
There is a redundant open curly bracket in this PR. Removing it allows the code to build and run. There are also some variables being declared but not used.
| ); | ||
|
|
||
| if (!isRequestorAuthorized) { | ||
| const canEditTeamCode = req.body.requestor.role === 'Owner' |
There was a problem hiding this comment.
This variable is declared but not used?
Shadhrush5
left a comment
There was a problem hiding this comment.
Hi, I reviewed the PR #704. Seems like I ran into an issue while building the current branch. I have attached a screenshot as well.
|
I am having issues starting the backend's server. Refer to the image for the errors.
|
mrinalini-raghavendran19
left a comment
There was a problem hiding this comment.
Hello!
The PR works mostly as expected - attached below is a recording of the same working.
I was able to login as an Owner and assign Toggle Request Bio permission to a volunteer user.
By logging in as a volunteer I was able to navigate to the Reports page -> weekly summaries section and use the toggle bar as expected.
Screen.Recording.2024-10-01.at.1.28.25.PM.mov
I do however have a few suggestions -
When I check into the backend branch, I face issues at build time. More specifically from the userProfileController.js.
There seems to be a redundant { in the code (snippet attached below for reference to anyone else facing the same issue):
if (!isRequestorAuthorized && !canToggleRequestBio) { // remove this brace { res.status(403).send('You are not authorized to update this user'); return; }
Great work!


















Description
A user with a 'requestBio' permission is now able to toggle the bio switch under Weekly Summaries Report.
Related PRS (if any):
To test this backend PR you need to checkout the #1831 frontend PR.
…
Main changes explained:
…
How to test:
npm install,npm run buildandnpm run startto run this PR locally