Fixed modules/plugins security extensions inclusion.
[fa-stable.git] / includes / access_levels.inc
index a61d4b3b8ab58e8677db2c8eb819502d2a02a8ac..7eccf93d43356b59dc478f2c2002a81000854e9e 100644 (file)
@@ -235,21 +235,15 @@ $security_areas =array(
        'SA_BANKREP' => array(SS_GL_A|3, _("Bank reports and inquiries")),
        'SA_GLREP' => array(SS_GL_A|4, _("GL reports and inquiries")),
 );
-/*
-       This function should be called whenever we want to extend core access level system
-       with new security areas and/or sections i.e.: 
-       . on any page with non-standard security areas
-       . in security roles editor
-*/
+
 function add_access_extensions()
 {
-       global $path_to_root, $security_areas, $security_sections;
-       
-       // Add extension private access levels
-       include($path_to_root.'/company/'.user_company().'/installed_extensions.php');
+       global $path_to_root, $security_areas, $security_sections, $installed_extensions;
+
        foreach($installed_extensions as $ext) {
                if (@$ext['active'] && isset($ext['acc_file']))
                        include($path_to_root.($ext['type'] == 'plugin' ? '/modules/':'/').$ext['path'].'/'.$ext['acc_file']);
        }
 }
+
 ?>
\ No newline at end of file