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
Regex not working. #1034
Comments
Your regexp is not valid https://play.golang.org/p/-QM2-bgDO3u |
Hi! Same kind of issue for me. Trying to "disallow all paths expect 2 folders" for a user. For this we could use regex "negation" pattern (see this: https://stackoverflow.com/questions/1687620/regex-match-everything-but-specific-pattern) But standard Golang regex seems not support it... Okay. (https://stackoverflow.com/questions/26771592/negative-look-ahead-go-regular-expressions) Actually i tried the "negative way" because the "positive way" didn't worked as i could expect: I expected to not see the homes folder :( I think @SJ50 and me are trying to do the same thing: How to give access only to a list of folders? Thanks, Thomas |
@thomaschampagne use the following rules first one is disallowing everything and following after that rules allows "Foo" and "Bar". @o1egl Please add this to wiki, I found this solution in closed issue answer. This solution is very handy when you have 100s of folder but want to allow few folder to users. |
@SJ50 Thanks for the tip. I needed to apply the similiar behavior with a inner folder. The use case: I want alice to a have access to "downloads" folder and only his home folder /homes/alice. Access to folder /homes/bob must be denied for alice Here's is the working config for this usual case: These usuals use cases should be added to wiki too. |
@thomaschampagne @SJ50 you are welcome to make a PR https://github.com/filebrowser/docs 😉 |
I wanted to create separate user with limited number of folder access.
So I added regex
^(?:(?!Foo|Bar).)*$\r?\n?
to allow folder named "Foo" and "Bar" but it does not work.I get message "Something really went wrong."
I do not want to disallow all the folder individually.
The text was updated successfully, but these errors were encountered: