Role to add/edit users

Role to add/edit users

by Brett Varney -
Number of replies: 13
I need to create (or edit) a non-administration role that can create and edit "lesser" user profiles. However, the only way to access the function seems to be on the Site Administration block, and I can't figure out how to make it show for non-admins. What am I missing?

Thank you.
Average of ratings: -
In reply to Brett Varney

Re: Role to add/edit users

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
The admin block should be visible if you are allowed to use any of the links it provides, and it should show only the links that you are allowed to access.
In reply to Tim Hunt

Re: Role to add/edit users

by Brett Varney -
OK, the role has Allow for: Change site configuration, Create users, Delete users, Edit own user profile, Update user profiles, and everything in the "Users" section. Have I missed anything critical?
In reply to Brett Varney

Re: Role to add/edit users

by Brett Varney -
Thanks for the help so far. Does anyone have a clue about this?
In reply to Brett Varney

Re: Role to add/edit users

by ben reynolds -
Hi Brett,

Can you specify please what you want this role to be able to do and what you don't want this role to be able to do?

Can you also specify the purpose?

For example, capability:
  • edit forums > yes
  • edit profiles > no
Purpose:
  • I WANT students to be able to edit forum contributions (I have them monitoring forums to make sure nobody uses foul language)
  • I DO NOT want students to be able to edit profiles
So, abilities and purpose. With that, your fellow Moodlers can help you.

In reply to ben reynolds

Re: Role to add/edit users

by Brett Varney -
Sorry for the confusion. The big picture is to have a set of users that are in total control of another group. Teachers should be able to enroll, track grades, update profiles, message, etc. ONLY their students. But this topic was just about creating a new user, without "higher level" privileges.

Again, thank you.
In reply to Brett Varney

Re: Role to add/edit users

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers
Brett - Creating a new user is a "higher level" privilege. The central thing to keep in mind is the context of a permission. They can either be site, course category, course, group, block or module levels. So the creation of a new user is something that really only makes sense on the site level. Peace - Anthony
In reply to Anthony Borrow

Re: Role to add/edit users

by Brett Varney -
I agree. The people paying me don't. So, no other options?
In reply to Brett Varney

Re: Role to add/edit users

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers
Looking back on the original post, Tim's response is accurate. If you have a capability that is considered part of site administration you will see those options. Is that not want you want or were hoping for? Peace - Anthony
In reply to Tim Hunt

Re: Role to add/edit users

by Damian Christey -
Operative word: "should"

I'm trying to do more or less the same thing:
1. Created a role called "registrar"
2. Gave that role permission to create users.
3. Assigned some users to that role.
4. Logged in as one of those users.
5. No administration block to be seen, no way to create users.

Are we missing something, or should I file a bug?
In reply to Damian Christey

Re: Role to add/edit users

by Paula Clough -

Are you building this role from scratch or working off a copy of another role?

I was working on having some helpers with enrolling students, editing profiles (so they can reset passwords) and creating courses.  I tried a lot of different things. I tried building from scratch, working off teacher role and course creator role, but when I finally worked off the Administrator role, making a copy and then moving from the allow column back to the Unset column.  I only kept the rights for those I needed them to do.  It is working great... 

Paula C

In reply to Damian Christey

Re: Role to add/edit users

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Well, it works for me in the latest 1.9.3+

To avoid doubt, the list of capabilities I gave my registrar role was:

moodle/site:uploadusers
moodle/user:create
moodle/user:delete
moodle/user:update
moodle/course:useremail
moodle/course:viewhiddenuserfields
moodle/site:viewfullnames
moodle/user:viewdetails
moodle/user:viewhiddendetails

(Basically I searched the define roles page for all the occurrences of 'user' and enabled the ones that seemed plausible.)
Average of ratings: Useful (1)
In reply to Tim Hunt

Re: Role to add/edit users

by Paul Fynn -

Hi Tim,

An old thread I know, but I can't make this work in 2.1 without granting site admin permissions, any suggestions?
Many thanks

Paul

In reply to Paul Fynn

Re: Role to add/edit users

by Paul Fynn -

OK - found my own answer, courtesy of John Isner:

This could do with being more prominent in the Moodle 2.0 documentation, perhaps,

best

Paul

Re: Create limited admin roles (create and edit users)
by John Isner - Friday, 22 February 2008, 06:14 AM
 

I have give them the appropriate permissions in the "teacher" settings.

By overriding the Teacher role, you gave your teachers permissions that they have no way of using. That's because the Teacher role is assigned in the Course context, while the things you want to enable them to do (like create new accounts and edit profiles) are in the System context.

Create a NEW role with just the needed permissions and assign it to selected users using Site administration -> Users -> Permissions -> Assign System roles. Then reset the Teacher role using the Reset to defaults button.