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

[Bug]: Resource Manager Error: cannot Remove Permissions on Folders #5857

Open
2 tasks done
jeremy-farrance opened this issue Nov 3, 2023 · 5 comments
Open
2 tasks done

Comments

@jeremy-farrance
Copy link
Contributor

jeremy-farrance commented Nov 3, 2023

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

Multiple related issues with Permissions not saving, including one that throws a console error, "TypeError: Cannot read properties of null (reading 'rolePermissions') in dnn-rm-edit-folder.tsx, line 133.

Details below in Steps to reproduce...

ERRORS on steps 15/16, 21/22

Steps to reproduce?

Using a clean new install of DNN v9.13.00:

  1. Go to Persona Bar, Manage / Roles
  2. Add a new Role named, "Content Manager"
  3. Go to Persona Bar, Manage / Site Assets (/Admin/File-Management)
  4. Add a new Folder in the root; Type=Standard and Name=Standard
  5. Add a new Folder in the root; Type=Secure and Name=Secure
  6. Find a PDF and JPG (local) file for testing
  7. Upload the PDF and JPG files to the Standard folder
  8. Upload the same PDF and JPG files to the Secure folder
  9. In the left pane Folder tree view, click on and select the Standard folder
  10. Right-click the Standard folder and select Edit
  11. Switch to the Permissions tab
  12. Open DevTools so you can see the Console
  13. Add the Content Manager role; allow View and Browse, leave Write clear, then Save
  14. Right-click (again) the Standard folder and select Edit
  15. Try to remove the Content Manager role by clicking the (x) to the right
  16. The console should show the following error:
    image
  17. Click Save anyhow in the still open Edit dialog
  18. Refresh the page
  19. Edit the Standard folder again, go to Permissions; the Content Manager role is still there
  20. For the All Users role, now uncheck (clear) View and Browse (Write should be unchecked too)
  21. Click Save (no console errors)
  22. Return to Edit/Permissions for the Standard folder; note that All Users View and Browse are checked still

Repeat the above steps (Standard folder) on the Secure folder and observe the results. Try doing page refreshes and not after each save. Strangely, the results will be different. Sometimes it works. Sometimes it works PARTIALLY (e.g. for All Users, uncheck Write and Browse, Save, and when you come back, Write is checked and Browse is not).

Emphasizing: The Standard folder never saves changes to Roles; Write/Browse. And weirdly, the Secured folder works sometimes and partially.

Example of Secure folder with Write and Browse checked for All Users

Before:
image

Intended settings (changes):
image

UNEXPECTED Results After Save:
image

Note: above is an example of the random results, again, sometimes it works, sometimes partial, and as you see above, sometimes very unexpected.

Current Behavior

No response

Expected Behavior

No response

Relevant log output

No response

Anything else?

Only testing on Chrome and Firefox, same results.

Affected Versions

v9.13.0 and v9.13.01 (updated after new tests on just released DNN; 20231207 JRF)

What browsers are you seeing the problem on?

Firefox, Chrome

Code of Conduct

  • I agree to follow this project's Code of Conduct
@jeremy-farrance jeremy-farrance changed the title [Bug]: Resource Manager throws a console error when you try to Remove a Permission [Bug]: Resource Manager cannot Remove Permissions on Files Nov 29, 2023
@jeremy-farrance
Copy link
Contributor Author

Just tested this after upgrading to yesterday's DNN release, v9.13.01 and the problems are not resolved. Screenshot below showing the after on Step 15 above. 1) DNN v9.13.01, 2) (x) has just been clicked, 3) JS console error appears immediately and is that same as reported above.

image

@jeremy-farrance jeremy-farrance changed the title [Bug]: Resource Manager cannot Remove Permissions on Files [Bug]: Resource Manager Error: cannot Remove Permissions on Folders Dec 7, 2023
@kevinwolter
Copy link

We are experiencing the same issue and was hopeful that it was resolved with #5865 but this still appears to be an issue in 9.13.1 so maybe these are unrelated.

@jeremy-farrance
Copy link
Contributor Author

This is still an easy to reproduce error in v9.13.02 on a quick/default install. I just used nvQuickSite, ran through the steps above on DNN v9.13.02, same result on step 16:
image

@6TELOIV
Copy link

6TELOIV commented Jun 12, 2024

Can confirm, running into this bug as well.

@jeremy-farrance
Copy link
Contributor Author

jeremy-farrance commented Jul 18, 2024

Since this was possibly or partially related to #6045 (#6046) which was fixed in v9.13.04 rc1, I wanted to test and see if there was any change in behavior or improvement.

This is still broken and appears to be worse, as it now fails in a similar way at an earlier step than before.

On Step 13 above, as soon as you click Add for the All Roles/Content Manager role, you see the following error in the DevTools console, thought the element becomes visible in the Edit Permissions modal:

image

Note that the results are the same for the Secure folder. And it makes no difference if you right-click on the Standard or Secure folder-list (left) or the items-listview (right). The steps provided above make this easy to reproduce in v9.13.04 (as of RC1).

I apologize that I do not have the skills set to provide a fix for this. But I am trying to contribute by providing easy to follow steps and details to reproduce the issue. Thanks - Jeremy

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

No branches or pull requests

3 participants