Repository navigation
Make File Search folder rules do what the Files panel says (#1388) - #1419
Merged
Merged
Conversation
A single rule hid every folder from all other roles, and a role with only deny rules saw nothing. Now a role without rules sees everything, allow rules narrow a role, deny always wins, administrators and API-key calls are not narrowed. Numbers and dates in the File Search UI follow the app's language instead of the browser's.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
Reported by another session reviewing
origin/main: the folder-permission code contradicted the docs and the Files panel ("A role without rules sees everything; with rules only the allowed folders, and deny wins").Changes
FileSearchEngine.scopeFornow does what the docs and the UI say:Also, numbers and dates in the File Search UI follow the app's language (
<html lang>), not the browser's: the English wizard showed "50.000 files".Cloud and self-hosted alike; folder rules are Enterprise only.
Type
Testing
packages/backendnpx tsc --noEmit -p tsconfig.jsonpackages/backendnpx jest src/file-search src/ee/file-search --maxWorkers=4file-search-scope.spec.ts, 5 cases)packages/backendnpm run lintpackages/frontendnpx tsc --noEmit -p tsconfig.jsonnode scripts/generate-llms-txt.mjs --checkRelated Issues
Relates to #1388, #1379.