diff --git a/wire/config.php b/wire/config.php index a8b80548..8095279a 100644 --- a/wire/config.php +++ b/wire/config.php @@ -1332,9 +1332,17 @@ $config->versionName = ''; * Value is null, 0, or 1 or higher. This should be kept at null in this file. * */ -$config->inputfieldColumnWidthSpacing = null; - +$config->inputfieldColumnWidthSpacing = null; +/** + * Populated to contain tags for document head + * + * This is populated only after a MarkupPagerNav::render() has rendered pagination and is + * otherwise null. + * + * $config->pagerHeadTags = ''; + * + */ /*** 11. SYSTEM ********************************************************************************* * diff --git a/wire/core/Config.php b/wire/core/Config.php index 67a8b06a..5d2203a6 100644 --- a/wire/core/Config.php +++ b/wire/core/Config.php @@ -143,6 +143,7 @@ * @property string $versionName This is automatically populated with the current PW version name (i.e. 2.5.0 dev) #pw-group-runtime * @property int $inputfieldColumnWidthSpacing Used by some admin themes to commmunicate to InputfieldWrapper at runtime. #pw-internal * @property bool $debugMarkupQA Set to true to make the MarkupQA class report verbose debugging messages (to superusers). #pw-internal + * @property string|null $pagerHeadTags Populated at runtime to contain `` tags for document head, after pagination has been rendered by MarkupPagerNav module. #pw-group-runtime * * @property int $rootPageID Page ID of homepage (usually 1) #pw-group-system-IDs * @property int $adminRootPageID Page ID of admin root page #pw-group-system-IDs diff --git a/wire/modules/Process/ProcessUser/ProcessUser.module b/wire/modules/Process/ProcessUser/ProcessUser.module index 32130e7d..0c533464 100644 --- a/wire/modules/Process/ProcessUser/ProcessUser.module +++ b/wire/modules/Process/ProcessUser/ProcessUser.module @@ -203,17 +203,24 @@ class ProcessUser extends ProcessPageType { $user = $this->wire('user'); $superuser = $user->isSuperuser(); $editableRoles = array(); + $userAdminAll = $this->wire('permissions')->get('user-admin-all'); foreach($this->wire('roles') as $role) { if($role->name == 'guest') continue; // if non-superuser editing a user, don't allow them to assign new roles with user-admin permission, - // unless the user already has the role checked - if(!$superuser && $role->hasPermission('user-admin') && !$page->hasPermission('user-admin')) continue; + // unless the user already has the role checked, OR the non-superuser has user-admin-all permission + if(!$superuser && $role->hasPermission('user-admin') && !$page->hasPermission('user-admin')) { + if($userAdminAll->id && $user->hasPermission($userAdminAll)) { + // allow it if the non-superuser making edits has user-admin-all + } else { + // do not allow + continue; + } + } $editableRoles[$role->id] = $role->name; } if(!$superuser) { - $userAdminAll = $this->wire('permissions')->get('user-admin-all'); if($userAdminAll->id && !$user->hasPermission($userAdminAll)) { foreach($editableRoles as $roleID => $roleName) { if(!$user->hasPermission("user-admin-$roleName")) {