Skip to content
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

Add backend for querying refs #414

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft

Add backend for querying refs #414

wants to merge 7 commits into from

Conversation

jmoggr
Copy link
Collaborator

@jmoggr jmoggr commented Feb 17, 2025

This is my attempt to create backend functions that generalizes across a number of issues and anticipates future requests.

#378
#347
#291

There two different sorts of queries that we need:

  1. querying the documents associated with a user

    • shows the relationship between the user and documents which they have permissions for
  2. querying all documents

    • shows documents without any relationship (outside of ownership)
  3. would be used for a users profile, 2. would be used as a more general search function.

To make things simpler for consumers I use the same interface and techniques for both queries. This may be a bit overkill for something like the user profile right now, but I think the uniformity is nice and could allow for more powerful searches later.

Both queries only show documents that the user who is searching is allowed to see (determined by the user id in the session). This can be easily extended to account for publish documents.

I still need to do more testing and to add tests, but I would like to get some feedback before spending more time on this.

@jmoggr jmoggr marked this pull request as draft February 17, 2025 17:56
…ectory; please check this into version control
Copy link

github-actions bot commented Feb 17, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant