Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Resource Manager in user mode prevents sub directory file management #5456

Closed
7 tasks
DNNMonster opened this issue Dec 24, 2022 · 2 comments · Fixed by #5484
Closed
7 tasks

Resource Manager in user mode prevents sub directory file management #5456

DNNMonster opened this issue Dec 24, 2022 · 2 comments · Fixed by #5484
Milestone

Comments

@DNNMonster
Copy link
Contributor

Description of bug

The RM in user mode can allow users to view files in sub directories but they can only delete or add files in their root folder.

Steps to reproduce

  1. Go to a page with the RM module and it's settings in user mode with the Users directory as it's default path.
  2. Log in as a user with access to the RM. Ensure the test user has a subdirectory with a file by adding it as an admin or uploading a zip with a directory and a test file.
  3. Try to upload a file to the subdirectory or delete an existing file within a sub directory.
  4. There is no error but these actions are not accessible outside the users root folder.

Current behavior

Users cannot add or delete files from sub directories that are within their root folder (ie 011/11/11/testdir/).

Expected behavior

Users should be able to add files and delete files from within any sub directory inside of their root folder.

Screenshots

Error information

No errors occur.

Additional context

The PermissionManager is using a IsUserFolder check that prevents the sub directories from passing the HasDeletePermission and HasAddFilesPermission bool function calls.

if (moduleMode == (int)Constants.ModuleModes.User && !this.IsUserFolder(folderId))

Affected version

  • 10.00.00 alpha build
  • [X ] 09.11.00 release candidate
  • 09.10.02 release candidate
  • 09.10.01 latest supported release

Affected browser

  • [ X] Chrome
  • Firefox
  • Safari
  • Internet Explorer 11
  • Microsoft Edge (Classic)
  • [ X] Microsoft Edge Chromium
@DNNMonster
Copy link
Contributor Author

I can PR a possible fix if this is actionable or it may just help show where things need attn.

https://github.com/DNNMonster/Dnn.Platform/tree/bugfix/5456-user-mode-rm-sub-dirs

@dhassall
Copy link

dhassall commented Dec 31, 2022

I have also just upgraded from 9.9.1 to 9.11.0 - Everything appears OK except the Resource Manager.
In my site I have a page accessible to a Role called Approver and in 9.9.1 with the previous "File Manager" only a folder called Docs2021 was accessible for them into which they could add Documents. Since upgrading to 9.11.0 and selecting the Telerik removal process the replacement module Resource Manager shows extra folders (Templates and Users) and some files in the Site Root. The Role can now only get the URL of the file or download existing ones. I have provided permission to all options View, Edit and Write but still the Upload option is not available.
Interestingly if I am logged in as SuperUser and go to the page I also cannot Upload but if if use the Site Assets from the Persona Bar I can navigate to that folder and upload, hopefully that will provide some assistance in debugging. Let me know if you need any further info :-)

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants