Index: branches/RC/core/units/admin/admin_events_handler.php =================================================================== diff -u -r10954 -r11135 --- branches/RC/core/units/admin/admin_events_handler.php (.../admin_events_handler.php) (revision 10954) +++ branches/RC/core/units/admin/admin_events_handler.php (.../admin_events_handler.php) (revision 11135) @@ -1117,7 +1117,7 @@ list($usec, $sec) = explode(' ', microtime()); return ((float)$usec + (float)$sec); } - + /** * Occurs after unit config cache was successfully rebuilt * @@ -1126,6 +1126,27 @@ function OnAfterCacheRebuild(&$event) { - } + } + /** + * Removes "Community -> Groups" section when it is not allowed + * + * @param kEvent $event + */ + function OnAfterConfigRead(&$event) + { + parent::OnAfterConfigRead($event); + + if (!$this->Application->ConfigValue('AdvancedUserManagement')) { + $section_ajustments = $this->Application->getUnitOption($event->Prefix, 'SectionAdjustments'); + if (!$section_ajustments) { + $section_ajustments = Array (); + } + + $section_ajustments['in-portal:user_groups'] = 'remove'; + + $this->Application->setUnitOption($event->Prefix, 'SectionAdjustments', $section_ajustments); + } + } + } \ No newline at end of file