X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Faccess_levels.inc;h=b35890bd7df3e1ffcea909e773036d680309a5f5;hb=2a0f29497517eca1cde8b2832da5761edefb2268;hp=f1ccc7f697b4b011ef149f867ae2f9ae3098c6f7;hpb=902f1015d874c33bd7946b17de2ad80b4f2144b6;p=fa-stable.git diff --git a/includes/access_levels.inc b/includes/access_levels.inc index f1ccc7f6..b35890bd 100644 --- a/includes/access_levels.inc +++ b/includes/access_levels.inc @@ -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"), @@ -154,6 +155,7 @@ $security_areas =array( 'SA_PURCHASEORDER' => array(SS_PURCH|3, _("Purchase order entry")), 'SA_GRN' => array(SS_PURCH|4, _("Purchase receive")), 'SA_SUPPLIERINVOICE' => array(SS_PURCH|5, _("Supplier invoices")), + 'SA_GRNDELETE' => array(SS_PURCH|9, _("Deleting GRN items during invoice entry")), 'SA_SUPPLIERCREDIT' => array(SS_PURCH|6, _("Supplier credit notes")), 'SA_SUPPLIERPAYMNT' => array(SS_PURCH|7, _("Supplier payments")), 'SA_SUPPLIERALLOC' => array(SS_PURCH|8, _("Supplier payments allocations")), @@ -197,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")), @@ -216,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")), @@ -225,6 +230,7 @@ $security_areas =array( 'SA_BANKTRANSFER' => array(SS_GL|6, _("Bank account transfers")), 'SA_RECONCILE' => array(SS_GL|7, _("Bank reconciliation")), 'SA_JOURNALENTRY' => array(SS_GL|8, _("Manual journal entries")), + 'SA_BANKJOURNAL' => array(SS_GL|11, _("Journal entries to bank related accounts")), 'SA_BUDGETENTRY' => array(SS_GL|9, _("Budget edition")), 'SA_STANDARDCOST' => array(SS_GL|10, _("Item standard costs")), @@ -233,4 +239,21 @@ $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 + The call should be placed between session.inc inclusion and page() call. +*/ +function add_access_extensions() +{ + 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