-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Org managers have full access to projects owned by their org #919
Conversation
Commit 06311c7 contains an attempt to get the JWT
if (User.Orgs.Any(o => o.OrgId == orgId && o.Role == OrgRole.Admin)) return true; The LexAuthUser.GetClaims() method in the backend is seeing the string "Admin" instead of the number 1 that it expects, and so it's turning that role into OrgRole.Unknown. I don't know how to solve that second problem. @hahn-kev, any ideas? Update: Thanks, solved now. |
3909e11
to
2dd4fb9
Compare
Org managers can view, edit, and sync any projects owned by the org they manage, even if they themselves are not explicitly listed as a member of that project. This is similar to how site admins have full access to anything, except restricted to projects owned by the org(s) in question.
This should be reverted once the JWTs are being serialized correctly (proper camelCase prop names and enums as strings instead of numbers) in the .NET backend code.
…ather than returning early.
If they turn out to be useful elsewhere, we'll make them public and add then to IPermissionService at that time.
2dd4fb9
to
3390063
Compare
C# Unit Tests52 tests 52 ✅ 6s ⏱️ Results for commit 086173b. ♻️ This comment has been updated with latest results. |
First step is to teach integration fixture how to create confidential projects.
Now we're ready to test Send/Receive of confidential projects by an org manager who's not explicitly listed as a project member.
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.
looks good, but I would like to avoid running a query every permission check as those happen quite frequently, especially during resumable S&R, use a cache similar to what I did in the lookup of project id via code.
This will greatly reduce the number of lookups that need to be made when an organization manager are trying to manage a project that he's not an explicit member of.
3fe6cf5
to
08bc5f8
Compare
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.
nice work, some minor things as well as caching the lookup for project confidentiality.
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.
looks good to me.
Fixes #915.
This PR used to be on top of #888, but now that #888 is merged, I've rebased on top of develop. So now it's ready to merge once it's been reviewed and approved.