You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to create a simple permission system and be able to control if a user can read and/or write a in a directory. For that, I created a plugin. If the user doesn't have the correct permissions, a Forbidden exception is thrown. Let's imagine the following directory structure with the respecting permissions for the current user:
Folder 1 (read & write)
Subfolder 1 (no read nor write)
...
Folder 2 (read & write)
....
Everything works great when the users tries to access Folder 2 or Subfolder 1. He either gets the expected folder data (Folder 2) or a Forbidden exception (Subfolder 1). But if he tries to access Folder 1, a Forbidden exception is thrown. How can I implement this in a way, that the user can still access Folder 1 but not Subfolder 1?
This is my current (simplified) code:
From my understanding, the exception is only thrown when the profind for the path "Subfolder 2" is handled, which is correct, but the exception isn't contained inside this node and therefor doesn't mark ONLY the folder/node "Subfolder 2" as Forbidden.
The text was updated successfully, but these errors were encountered:
I want to create a simple permission system and be able to control if a user can read and/or write a in a directory. For that, I created a plugin. If the user doesn't have the correct permissions, a Forbidden exception is thrown. Let's imagine the following directory structure with the respecting permissions for the current user:
Everything works great when the users tries to access Folder 2 or Subfolder 1. He either gets the expected folder data (Folder 2) or a Forbidden exception (Subfolder 1). But if he tries to access Folder 1, a Forbidden exception is thrown. How can I implement this in a way, that the user can still access Folder 1 but not Subfolder 1?
This is my current (simplified) code:
From my understanding, the exception is only thrown when the profind for the path "Subfolder 2" is handled, which is correct, but the exception isn't contained inside this node and therefor doesn't mark ONLY the folder/node "Subfolder 2" as Forbidden.
The text was updated successfully, but these errors were encountered: