-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Global search on elasticsearch for private repositories #6107
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
Comments
Did you set the privacy level of those projects to private (project and versions)? If so, I think we missed filtering search results using the privacy level here. But on the commercial site we override our classes to respect privacy levels. |
Yes, I did setup two projects with one version (latest) each. Project A is a public project with public version and project B is a private project with a private version. Elasticsearch will index both (Autoindex set to true) and will return results from the private project when not logged in as an appropriate user. Would you be willing to share that template with me or is there any help for this? It would make sense to me if elasticsearch will generate n-indices based on permissions (or one index per project) and offer only the ones that fit the user permissions. |
Just in case, this is the class the needs to be overriden readthedocs.org/readthedocs/search/faceted_search.py Lines 208 to 216 in b6a532b
Also, we are in the process of moving some private code to the public repo. |
Just a note here, we are in process to remove the privacy level from all projects #6194 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I'm running a local instance of RTD (3.7.2) combined with elasticsearch.
Searching the whole RTD instance from the landing page also returns search entries belonging to private repositories. This seems to be a security flaw since the index probably doesn't care about access rights on the webpage.
The major goal I'm trying to achieve is hosting development and user documentation on the same server using private repositories for developers (which would access and search both) as well as user documentation for people without credentials.
Is there a way to propagate repository rights to elasticsearch?
The text was updated successfully, but these errors were encountered: