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

Custom users cannot be edited from the page tree or found in admin search ($user->editable()) #1877

Closed
JanRomero opened this issue Jun 12, 2016 · 3 comments

Comments

@JanRomero
Copy link

JanRomero commented Jun 12, 2016

I keep a special class of users with a custom UserTemplate within the non-admin part of the page tree. These users are supposed to be administrated by standard users who have a certain role. When these administrator users (non-superusers) navigate to a custom user’s edit page via Access->Users this works fine. What doesn’t work is accessing the edit page via page tree actions or the admin search bar, because PagePermissions::userEditable() will return false unless it is called from process ProcessUser.

This forces administrator users to deviate from their usual workflow by necessitating they take a specific route to the edit page instead of going through the page tree or admin search as they would with normal pages.

The following condition should be removed from PagePermissions.module, IMHO:

// if the current process is something other than ProcessUser, they don't have permission
if($this->wire('process') != 'ProcessUser') {
    return false;
}
@LostKobrakai
Copy link

This is expected behavior as users are meant to be edited by ProcessUser only. But I'm with you, that the page-tree actions should still work and deligate to ProcessUser in this case.

@ryancramerdesign
Copy link
Owner

Currently it would only work if the user was superuser. But I think it's okay to open up the permissions a bit here for users that have user-admin permission. I've updated it so that you should be able to get working edit links from within PageList and PageLister.

@isellsoap
Copy link
Collaborator

@JanRomero This issue seems to be fixed, thus I close it. If you think the issue isn’t fixed yet or requires additional work to do, please consider reopening it.

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

4 participants