WeBWorK Main Forum

Can we restrict email change by user?

Re: Can we restrict email change by user?

by Danny Glin -
Number of replies: 0

A couple of things to note:

The default roles and associated permission levels are defined in defaults.config:

%userRoles = (
        guest         => -5,
        student       => 0,
        login_proctor => 2,
        grade_proctor => 3,
        ta            => 5,
        professor     => 10,
        admin         => 20,
        nobody        => 99999999, # insure that nobody comes at the end

You don't need to add a new permission level that is above all the others, since "nobody" is already there.  Also be aware that a permission level of 15 falls below "admin", so any permissions assigned to a role with permission level 15 would be inherited by anyone with role "admin".

It looks like the nobody role was added to allow permissions to be disabled from the course configuration page.  In the global config files, the recommended way to remove a permission from all users is to undefine it, so you would use

$permissionLevels{change_email_address} = undef;