Guy Verville Posted August 14, 2018 Share Posted August 14, 2018 Hi, We were asked to be able to manage users by role. A company has 7 branches and would like to grant permissions to branch administrators to manage the creation of users only for their branch, thus not being able to see other users. Although we can create user profiles, we would rather filter the user administration process as it exists. I wonder if anyone has ever created anything similar. Link to comment Share on other sites More sharing options...
Robin S Posted August 14, 2018 Share Posted August 14, 2018 Check out the blog post about user-admin-[role] permissions: https://processwire.com/blog/posts/new-user-admin-permissions-automatic-version-change-detection-and-more-2.6.10/#new-user-admin-permissions 4 Link to comment Share on other sites More sharing options...
Guy Verville Posted August 14, 2018 Author Share Posted August 14, 2018 Oh, thank you. It is already present for a long time! Link to comment Share on other sites More sharing options...
Guy Verville Posted August 15, 2018 Author Share Posted August 15, 2018 I may not understand everything here. I followed the instructions and do obtain a menu with the correct group of users... but I can not display them... What am I missing? And why do I see guest users? Link to comment Share on other sites More sharing options...
Guy Verville Posted August 15, 2018 Author Share Posted August 15, 2018 I realize that the module Admin Restrict Branch interferes with the core logic. (sigh) Link to comment Share on other sites More sharing options...
adrian Posted August 15, 2018 Share Posted August 15, 2018 13 minutes ago, Guy Verville said: I realize that the module Admin Restrict Branch interferes with the core logic. (sigh) Glad I stumbled across this post - ARB should not get involved with displaying users - is there anything special I need to do to reproduce? Link to comment Share on other sites More sharing options...
Guy Verville Posted August 15, 2018 Author Share Posted August 15, 2018 I made a simple case of creating a role with only the management of users as requested and it works. ARB is used with a role that must be restricted for the page tree. I do get, as shown, the user menu, but the pages themselves aren't shown. If I change the role name to something that doesn't match the branch involved, I get my users... Maybe other restrictions are involved and coded by my programmer who is on vacation. I don't know. I will have to wait, I think. Link to comment Share on other sites More sharing options...
adrian Posted August 15, 2018 Share Posted August 15, 2018 Just now, Guy Verville said: I made a simple case of creating a role with only the management of users as requested and it works. ARB is used with a role that must be restricted for the page tree. I do get, as shown, the user menu, but the pages themselves aren't shown. If I change the role name to something that doesn't match the branch involved, I get my users... Thanks - I see the problem - it's to do with the way ARB blocks pages when viewed in Lister and because the Users page in PW uses Lister, it is causing the problem. I should have a fix shortly. 3 Link to comment Share on other sites More sharing options...
Guy Verville Posted August 15, 2018 Author Share Posted August 15, 2018 Just now, adrian said: Thanks - I see the problem - it's to do with the way ARB blocks pages when viewed in Lister and because the Users page in PW uses Lister, it is causing the problem. I should have a fix shortly. That's a good news! Thanks. Link to comment Share on other sites More sharing options...
adrian Posted August 15, 2018 Share Posted August 15, 2018 I have pushed a fix for this, but I have discovered that Ryan's recent changes to the admin live search functionality has broken restricting of search results. I am working on this now, but could be a bit painful. 3 Link to comment Share on other sites More sharing options...
Guy Verville Posted August 15, 2018 Author Share Posted August 15, 2018 Thank you very much for the fix, Adrian. It works! 1 Link to comment Share on other sites More sharing options...
adrian Posted August 15, 2018 Share Posted August 15, 2018 Ok, I have been looking at the admin live search results and it seems that if the user doesn't have edit rights (either in general, or because of ARB), then the result link goes to view the page on the frontend, rather than edit in the backend. I think I find it a bit strange that the results don't have links to both when appropriate. But anyway, I don't think there are actually any issues with ARB and the new PW admin search, but I wouldn't mind a few others to investigate to make sure I haven't missed anything. Link to comment Share on other sites More sharing options...
adrian Posted August 16, 2018 Share Posted August 16, 2018 @Guy Verville - I just updated the module with a more reliable fix - the other one would probably have worked on almost all sites, but there was a possibility for an issue. Please let me know if you have any problems with the new version. 2 1 Link to comment Share on other sites More sharing options...
Guy Verville Posted August 16, 2018 Author Share Posted August 16, 2018 @adrian Thank you very much for all your effort! 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now