Project

General

Profile

Bug #3257 ยป 3257.patch

krileon, 11 February 2012 01:10

View differences:

administrator/components/com_comprofiler/library/cb/cb.tables.php
$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 ) {
......
// 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;
    (1-1/1)