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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Obscure semantics of allow/disallow matching #3

Closed
loisch opened this issue Mar 22, 2018 · 2 comments
Closed

Obscure semantics of allow/disallow matching #3

loisch opened this issue Mar 22, 2018 · 2 comments

Comments

@loisch
Copy link

loisch commented Mar 22, 2018

First of all: File Browser is great! The UI feels real good and the feature set is consistent and matches my needs. 馃憤

I've tried to control which files and directories could be accessed by a user but with the current semantics of the regular and regex matching the feature is really hard to use for advanced control.

First I had to find out that the first match starting at the end is used. So if I want to include a "everything is forbidden" this rule must come first followed by the allow rules. If I include an everything is forbidden rule, regular features not related to files stop working (for example I can't change the view/listing format).
Second it's really hard to get the rules right because only the name with a prepended slash and not the full path is matched.

It would be great if

  • matching would only apply to file-paths and can not break other features
  • matching the full path would be possible
  • the documentation would explain the matching algorithm if several rules match

Thank's a lot for the great work! I'll have to find a different way of controlling access to files but I'm still a happy user. 馃憤

@danielloader
Copy link

Agreed with all of the above.
Could be simplified with a toggle with whitelist or blacklist by default.
Some users I'd like to whitelist two directories, some I'd like to blacklist a few, some get all.

Hard to do easily unless I'm missing something obvious.

If anyone does have a working regex example for deny all except certain folders I'm all ears.

@hacdias
Copy link
Member

hacdias commented Jan 6, 2019

(Dis)allow rules apply to file paths only. If the user doesn't have access it will, of course, return an error if they try to forcefully call the API. Matching the full path is possible. Just use a regular expression that matches from the start to the end or a path.

I'll then consider this issue more about documentation, so I'll move it to another repository so I don't forget to add more info about the Rules on the new documentation.

@hacdias hacdias transferred this issue from filebrowser/filebrowser Jan 6, 2019
@o1egl o1egl closed this as completed Jul 24, 2023
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

No branches or pull requests

4 participants