enable.sql 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. SET @sName = 'bx_acl';
  2. -- PAGE: view levels
  3. INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES
  4. ('bx_acl_view', '_bx_acl_page_title_sys_view', '_bx_acl_page_title_view', @sName, 5, 2147483647, 1, 'acl-view', 'page.php?i=acl-view', '', '', '', 0, 1, 0, '', '');
  5. INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
  6. ('bx_acl_view', 1, @sName, '_bx_acl_page_block_title_system_view', '_bx_acl_page_block_title_view', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:6:\"bx_acl\";s:6:\"method\";s:14:\"get_block_view\";}', 0, 1, 0);
  7. -- MENU: Account links
  8. SET @iMIOrder = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_menu_items` WHERE `set_name` = 'sys_account_notifications');
  9. INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES
  10. ('sys_account_notifications', 'bx_acl', 'acl-view', '_bx_acl_menu_item_title_system_acl_view', '_bx_acl_menu_item_title_acl_view', 'page.php?i=acl-view', '', '', 'shield col-red2', '', '', 2147483646, 1, 0, @iMIOrder + 1);
  11. -- SETTINGS
  12. -- SET @iTypeOrder = (SELECT MAX(`order`) FROM `sys_options_types` WHERE `group` = 'modules');
  13. -- INSERT INTO `sys_options_types`(`group`, `name`, `caption`, `icon`, `order`) VALUES
  14. -- ('modules', @sName, '_bx_acl', 'bx_acl@modules/boonex/acl/|std-icon.svg', IF(ISNULL(@iTypeOrder), 1, @iTypeOrder + 1));
  15. -- SET @iTypeId = LAST_INSERT_ID();
  16. -- INSERT INTO `sys_options_categories` (`type_id`, `name`, `caption`, `order`)
  17. -- VALUES (@iTypeId, @sName, '_bx_acl', 1);
  18. -- SET @iCategId = LAST_INSERT_ID();
  19. -- INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `check`, `check_error`, `extra`, `order`) VALUES
  20. -- ('bx_acl_remove_expired_for', '30', @iCategId, '_bx_acl_option_remove_expired_for', 'digit', '', '', '', 3);
  21. -- ALERTS
  22. INSERT INTO `sys_alerts_handlers`(`name`, `class`, `file`, `service_call`) VALUES
  23. (@sName, 'BxAclResponse', 'modules/boonex/acl/classes/BxAclResponse.php', '');
  24. SET @iHandler := LAST_INSERT_ID();
  25. INSERT INTO `sys_alerts` (`unit`, `action`, `handler_id`) VALUES
  26. ('system', 'page_output_block_acl_level', @iHandler);