Skip to content

Conversation

fisx
Copy link
Contributor

@fisx fisx commented Apr 26, 2023

https://wearezeta.atlassian.net/browse/FS-1880

integration test is under way elsewhere for technical reasons.

Checklist

  • Add a new entry in an appropriate subdirectory of changelog.d
  • Read and follow the PR guidelines

@zebot zebot added the ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist label Apr 26, 2023
Copy link
Contributor

@smatting smatting left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

integration test for this is in #3251, which will fail after this PR is merged.

@@ -92,6 +93,7 @@ search ::
Maybe (Range 1 500 Int32) ->
(Handler r) (Public.SearchResult Public.Contact)
search searcherId searchTerm maybeDomain maybeMaxResults = do
ensurePermissionsOrPersonalUser searcherId [SearchContacts]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be moved into searchLocally, which already looks up the team id. Federated searching has its own policies, maybe this check isn't relevant there.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i agree that's a possible optimization, but i think we should also disallow remote searches for ephemeral users. i'll leave a comment in the code, ok?

@fisx fisx merged commit 2de67ea into develop Apr 27, 2023
@fisx fisx deleted the FS-1880-tweak-search branch April 27, 2023 09:15
@fisx fisx mentioned this pull request Apr 28, 2023
smatting added a commit that referenced this pull request Apr 28, 2023
supersven pushed a commit that referenced this pull request Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants