[Bug]: Visible to Admin Only no Longer Functional
Is there an existing issue for this?
- [x] I have searched the existing issues
What happened?
Now that DNN 10.x has the new "Content Editors" and "Content Managers" roles, the existing "Visible to Administrators Only" functionality can no longer be triggered.
Steps to reproduce?
- Create a page
- Ensure it is visible to administrators only (Plus the auto assigned Editor/Manger Roles)
- View the page
Current Behavior
No "Visible to Administrators Only" message is displayed
Expected Behavior
In prior to DNN 10.x there would be a message in a blue box (dnnFormMessage dnnFormInfo) showing that it was visible to Administrative users only.
Given the behavior of Content Editors and Content Managers I would still expect to see the message.
Relevant log output
Anything else?
No response
Affected Versions
10.0.x & later
What browsers are you seeing the problem on?
No response
Code of Conduct
- [x] I agree to follow this project's Code of Conduct
It looks like it is the check here - https://github.com/dnnsoftware/Dnn.Platform/blob/fe80cae08f7aaaa152bbdf39770d01f9a40e67f0/DNN%20Platform/Library/UI/Containers/Container.cs#L236
Talking with @valadas, it is clear that this issue does not have a simple solution. In earlier versions of DNN, workflows were simpler because the main factor was whether the user was an admin or not. Now there are more categories of users with different enhanced rights.
A potentially useful feature might be to highlight modules that are not visible to the public. My main interest is in easily identifying which modules a non-authenticated user cannot see.
I think the fix here is not too hard actually, to retain the current behavior, but the "how" is where it gets a bit complicated for the checks.
Before the check was If the ONLY visible role was "Administrators" it is admin only.
Now, we have to check if the only visible roles INCLUDE Administrators, Content Editors, and/or Content Managers, then it is visibiel to content authors only.
My concern is with the placement of that check and the performance of it, how do we do it quickly without risk.