Changed structure of tag_association table
[fa-stable.git] / includes / access_levels.inc
index 3c60a0922a83a308498896ac2fc63b4cf2314ded..b35890bd7df3e1ffcea909e773036d680309a5f5 100644 (file)
@@ -64,6 +64,7 @@ $security_sections = array(
  SS_MANUF_C => _("Manufacturing configuration"),
  SS_MANUF => _("Manufacturing transations"),
  SS_MANUF_A => _("Manufacturing analytics"),
+ SS_DIM_C => _("Dimensions configuration"),
  SS_DIM => _("Dimensions"),
  SS_GL_C => _("Banking & GL configuration"),
  SS_GL => _("Banking & GL transactions"),
@@ -198,6 +199,8 @@ $security_areas =array(
 //
 // Dimensions
 //
+       'SA_DIMTAGS' => array(SS_DIM_C|1, _("Dimension tags")),
+
        'SA_DIMTRANSVIEW' => array(SS_DIM|1, _("Dimension view")),
 
        'SA_DIMENSION' => array(SS_DIM|2, _("Dimension entry")),
@@ -217,6 +220,7 @@ $security_areas =array(
        'SA_TAXGROUPS' => array(SS_GL_C|8, _("Tax groups")),
        'SA_FISCALYEARS' => array(SS_GL_C|9, _("Fiscal years maintenance")),
        'SA_GLSETUP' => array(SS_GL_C|10, _("Company GL setup")),
+       'SA_GLACCOUNTTAGS' => array(SS_GL_C|11, _("GL Account tags")),
 
        'SA_BANKTRANSVIEW' => array(SS_GL|1, _("Bank transactions view")),
        'SA_GLTRANSVIEW' => array(SS_GL|2, _("GL postings view")),
@@ -240,16 +244,16 @@ $security_areas =array(
        with new security areas and/or sections i.e.: 
        . on any page with non-standard security areas
        . in security roles editor
+       The call should be placed between session.inc inclusion and page() call.
 */
 function add_access_extensions()
 {
-       global $path_to_root, $security_areas, $security_sections;
-       
-       // Add extension private access levels
-       include($path_to_root.'/installed_extensions.php');
+       global $path_to_root, $security_areas, $security_sections, $installed_extensions;
+
        foreach($installed_extensions as $ext) {
-               if (isset($ext['acc_file']))
-                       include_once($path_to_root.($ext['type'] == 'plugin' ? '/modules/':'/').$ext['path'].'/'.$ext['acc_file']);
+               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