Permissions for main page works.
[order_line_extra.git] / hooks.php
index 1f571a56eeaf45f361df163af936d891ff188e5a..2425ba93d8822dd3995798b2b3fe5ffac3558bd7 100644 (file)
--- a/hooks.php
+++ b/hooks.php
@@ -6,7 +6,7 @@
 // Title:   Order Line Extra
 // Free software under GNU GPL
 // ----------------------------------------------------------------
-define ('SS_ORDERLINEX', 131<<8);
+define ('SS_ORDERLINEX', 100<<8);
 
 class hooks_order_line_extra extends hooks {
        var $module_name = 'order_line_extra';
@@ -21,11 +21,17 @@ class hooks_order_line_extra extends hooks {
 
     function install_options($app) {
         global $path_to_root;
+                               switch($app->id) {
+                                       case 'orders':
+                                               $app->add_rapp_function(0, _('Order Extra'), 
+                                                       $path_to_root.'/modules/order_line_extra/order_lines_view.php', 'SA_SALESTRANSVIEW');
+                               }
     }
 
     function install_access()
        {
-        $security_sections[SS_ORDERLINEX] =  _("Order Line eXtra");
+        $security_sections[SS_ORDERLINEX] =  _("Order Line Extra");
+               $security_areas['SA_ORDERLINEX_EDIT'] = array(SS_ORDERLINEX|1, _("Edit lines"));
 
                return array($security_areas, $security_sections);
        }