# This patch file was generated by NetBeans IDE # Following Index: paths are relative to: Joomla root # This patch can be applied using context Tools: Patch action on respective folder. # It uses platform neutral UTF-8 encoding and \n newlines. # Above lines and this line are ignored by the patching process. --- administrator/components/com_comprofiler/library/cb/cb.tables.php +++ administrator/components/com_comprofiler/library/cb/cb.tables.php @@ -1353,7 +1353,7 @@ $myGids = $_CB_framework->acl->get_groups_below_me( null, true ); $cms_admin = $_CB_framework->acl->mapGroupNamesToValues( 'Administrator' ); $cms_super_admin = $_CB_framework->acl->mapGroupNamesToValues( 'Superadministrator' ); - $i_am_super_admin = in_array( $cms_super_admin, $myGids ); + $i_am_super_admin = $_CB_framework->acl->amIaSuperAdmin(); $i_am_admin = in_array( $cms_admin, $myGids ); if ( ! $isNew ) { @@ -1395,7 +1395,7 @@ // CB-specific: disallow change of own Super Admin group: $this->_error = 'You cannot change your own Super Administrator status for your site'; return false; - } else if ( $i_am_admin && $oldUserComplete->gid == $cms_admin ) { + } else if ( ( ! $i_am_super_admin ) && $i_am_admin && ( $oldUserComplete->gid == $cms_admin ) ) { // disallow change of super-Admin by non-super admin $this->_error = 'You cannot change the Group of another Administrator as you are not a Super Administrator for your site'; return false;