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

enable search for articles with restricted access #117

Open
Lullabyq opened this issue Mar 1, 2023 · 3 comments
Open

enable search for articles with restricted access #117

Lullabyq opened this issue Mar 1, 2023 · 3 comments
Assignees
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@Lullabyq
Copy link
Contributor

Lullabyq commented Mar 1, 2023

user with access to article should be able to find it through search
user without access should not be able to get access to it

@Lullabyq Lullabyq added the bug Something isn't working label Mar 1, 2023
@Lullabyq Lullabyq self-assigned this Mar 1, 2023
@Lullabyq
Copy link
Contributor Author

Lullabyq commented Mar 1, 2023

problem:

search exclude file, which is build/search-doc.json, is generated with SSR
<-->
access is checked in user browser as long as it is stored in LocalStorage

@Lullabyq Lullabyq added the wontfix This will not be worked on label Mar 1, 2023
@Lullabyq
Copy link
Contributor Author

Lullabyq commented Mar 1, 2023

idea to filter routes in index.js of SearchBar before initialization of algolia (initAlgolia) failed because of lunr-search.json file, which is apparently responsible for searching a correct spot in a files, and as long as you remove some items from array this highlighting is broken (abstraction on this package)

response of the lunr-search is totall mess of numbers (not human-readable), so we can't modify it
and also we don't have access to generation code of lunr-search file which is out of scope of SearchBar (top-level swizzled component)

image

@Lullabyq
Copy link
Contributor Author

Lullabyq commented Mar 1, 2023

The only solution i can come up with is to recreate new lunr file in SearchBar component, but this will diverse our code from lib dramatically

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant