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

Remove Admin Page/Module Registered User View #2770

Merged
merged 1 commit into from
May 2, 2023
Merged

Conversation

thabaum
Copy link
Contributor

@thabaum thabaum commented May 2, 2023

No description provided.

@sbwalker
Copy link
Member

sbwalker commented May 2, 2023

This PR is not valid. The /admin page needs to be accessible by Registered Users by default to enable the delegation capability which was added earlier this year. User/Role/Profile management can be delegated to non-Administrators and they need to be able to access the Admin Dashboard to view the options. If a registered user accesses the Admin Dashboard and no rights have been delegated to them, no options will be displayed. If you do not like this default behavior you can always adjust the page permissions in your own installation to remove the Registered Users role.

@sbwalker sbwalker closed this May 2, 2023
@thabaum
Copy link
Contributor Author

thabaum commented May 2, 2023

They should not know it exists, it should show 404 page

@sbwalker
Copy link
Member

sbwalker commented May 2, 2023

"If you do not like this default behavior you can always adjust the page permissions in your own installation to remove the Registered Users role" - this will result in a 404 page

@thabaum
Copy link
Contributor Author

thabaum commented May 2, 2023

"If you do not like this default behavior you can always adjust the page permissions in your own installation to remove the Registered Users role" - this will result in a 404 page

I did this, but I guess I am still trying to understand why it is by default allowing registered users access to the admin page. Shouldn't it be the other way around, if you want to allow a user to perform User/Role/Profile management you grant them access to these areas.

Can you show me or explain the use case in a bit more detail for this being default setting?

"User/Role/Profile management can be delegated to non-Administrators" but should it be by default? A user can update their profile still. I would love to understand this fully. Is there documentation I can read up on?

For allowing registered users to manage other users, their roles and profiles is what I understand is why it is set this way to be clear. I ask because don't think I would want this as a default unless the site needs it for some reason. I would think another role would be created adding users to it to manage different parts of the admin panels.

@sbwalker
Copy link
Member

sbwalker commented May 2, 2023

After further review, the delegated admin capability relies on an Administrator setting the permissions for the specific pages/modules (ie. User, Role, Profile) which they would like to delegate - so it makes sense that they would need to set the permissions for the /admin page as well. So I will merge this PR. There is no official documentation for delegated permissions - there is just a blog which attempts to describe the enhancement https://www.oqtane.org/blog/!/55/permission-enhancements and there is a thread in the repo which contains more info as well.

@sbwalker sbwalker reopened this May 2, 2023
@sbwalker sbwalker merged commit e88ca00 into oqtane:dev May 2, 2023
@sbwalker
Copy link
Member

sbwalker commented May 3, 2023

@thabaum here is the link to information about delegated administration:

#2481 (comment)

You will notice that it mentions that you need to adjust the permissions for the various admin pages/modules you wish to delegate ie. User Management, Role Management, etc... Based on this PR, the instructions will need to be modified as the Admin Dashboard page/module will also need to have its permissions adjusted to include delegated access.

Note that in order for a non-Admin to be able to see the Admin Dashboard, the Index.razor SecurityAccessLevel cannot be set to Admin - or else it would restrict access and there would be no way to override. This is why PR #2776 is not valid. I do believe the SecurityAccessLevel could be set to View rather than Anonymous without breaking any functionality.

@thabaum
Copy link
Contributor Author

thabaum commented May 3, 2023

OK I agree with view, now that I read this I think we are on the same page as far as concern goes. My next concern is changing this has no affect on the page.

@thabaum thabaum mentioned this pull request May 3, 2023
@thabaum thabaum deleted the patch-23 branch May 12, 2023 15:42
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 this pull request may close these issues.

2 participants