WIP: fix & enhance#19
Merged
6543 merged 6 commits intoJun 20, 2021
Merged
Conversation
Author
|
wip because test is failing: -- get user // filter by user id // make sure user set membership visible // return only org's actor is allowed to see
-- TestUserOrgs: unrelated user should not get private org membership of privateMemberUsername
SELECT `id`, `...`, `lower_name`, FROM `user` WHERE `user`.`id` IN (SELECT org_user.org_id FROM org_user WHERE org_user.uid=4) AND `user`.`id` IN (SELECT org_user.org_id FROM org_user WHERE org_user.is_public= true OR org_user.uid=5) AND (`user`.visibility IN (public,limited) OR `user`.`id` IN (SELECT org_user.org_id FROM org_user WHERE org_user.uid=5)) ORDER BY `user`.`name` ASC; -- [4 true 5 public limited 5] - 81.88µs
SELECT count(*) FROM `user` WHERE `user`.`id` IN (SELECT org_user.org_id FROM org_user WHERE org_user.uid=?) AND `user`.`id` IN (SELECT org_user.org_id FROM org_user WHERE org_user.is_public= ? OR org_user.uid=?) AND (`user`.visibility IN (?,?) OR `user`.`id` IN (SELECT org_user.org_id FROM org_user WHERE org_user.uid=?)); -- [4 true 5 public limited 5] - 40.011µs
-- TestUserOrgs: not authenticated call also should hide org membership
SELECT `id`, `...`, `lower_name`, FROM `user` WHERE `user`.`id` IN (SELECT org_user.org_id FROM org_user WHERE org_user.uid=4) AND `user`.`id` IN (SELECT org_user.org_id FROM org_user WHERE org_user.is_public= true) AND `user`.visibility=public ORDER BY `user`.`name` ASC; -- [4 true public] - 54.02µs
SELECT count(*) FROM `user` WHERE `user`.`id` IN (SELECT org_user.org_id FROM org_user WHERE org_user.uid=?) AND `user`.`id` IN (SELECT org_user.org_id FROM org_user WHERE org_user.is_public= ?) AND `user`.visibility=?; -- [4 true public] - 26.57µs |
3 tasks
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
some things I did ...