-
Notifications
You must be signed in to change notification settings - Fork 56
Fix for Issue #561 Return empty invites for user without enough permission #570
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
Fix for Issue #561 Return empty invites for user without enough permission #570
Conversation
gets0ul
commented
May 6, 2020
- use separate scope for invites
- return project with empty invites if user doesn't have enough permission
- return project with empty invites if user doesn't have enough permission
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.
@gets0ul works good.
The only thing we have to find invites by email
in a case-insensitive way, but I guess thee lines wouldn't fine invite if user is invited with email in different case than in user profile.
_.filter(fp.invites, invite => invite.userId === currentUserId || invite.email === email);
@maxceem PR is updated |
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.
@gets0ul some lint errors are there, and I guess there is a misuse of email
and currentUserEmail
@maxceem fixed. |
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.
Works good now @gets0ul.
Actually, we also have to filter invites when we get the from DB in the project list endpoint, not only ES, but it's better to handle it a little bit letter due to other changes we did in develop
branch.
3a7f1ad
into
topcoder-platform:feature/members-invites-permission-fixes
@maxceem I am pretty much sure that we have taken care of this but just want to be double sure, this change would not cause problem in returning invites for a user is invited to the project. |
Yes, we took care of it. And it's already deployed to DEV. So I guess during QA someone would notice if it accidentally got broken somehow. But as it's important functionality I would ask QA team to make regression testing here appirio-tech/connect-app#4019. |