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

The 'rules' for all users are not effective #198

Closed
shookgao opened this issue Nov 27, 2024 · 3 comments · Fixed by #204
Closed

The 'rules' for all users are not effective #198

shookgao opened this issue Nov 27, 2024 · 3 comments · Fixed by #204

Comments

@shookgao
Copy link

WebDAV version: 5.4.3
The 'rules' for all users are not effective
I have a main directory: x, which has two subdirectories: a and b. I set them as follows:

directory: /x
permissions: R
rules:
  - path: /a
    permissions: CR
users:
  - username: y
  - password: y
  - rules:
      - path: /b
      - permissions: CRUD

The result is that directory A does not have permission C

@shookgao
Copy link
Author

I found that it was not ineffective, but was overwritten by rules under users, which was different from what I expected. I thought it should be a merge.

@hacdias
Copy link
Owner

hacdias commented Nov 28, 2024

The rules directive for each user completely override the global rules. That is the intended behavior.

I agree that it may be confusing and unexpected. I think the main reason I did it this way is because each user can also overwrite the directory. In that case, it would be a bit odd if some of the rules would still apply, especially when it comes to rules that are applicable to paths.

Nevertheless, we can convert this to a feature request: add a new global field that allows changing the behavior of re-defining the rules. It could be either overwrite (default to keep backwards compatibility) or merge.

What do you think?

@shookgao
Copy link
Author

shookgao commented Dec 4, 2024

It would be great if this option could be added!

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

Successfully merging a pull request may close this issue.

2 participants