enable.sql 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. -- Email template
  2. INSERT INTO `sys_email_templates` (`Module`, `NameSystem`, `Name`, `Subject`, `Body`) VALUES
  3. ('bx_azrb2c', '_bx_azrb2c_et_password_generated', 'bx_azrb2c_password_generated', '_bx_azrb2c_et_password_generated_subject', '_bx_azrb2c_et_password_generated_body');
  4. -- Auth objects
  5. INSERT INTO `sys_objects_auths` (`Name`, `Title`, `Link`, `Icon`, `Style`) VALUES
  6. ('bx_azrb2c', '_bx_azrb2c_auth_title', 'modules/?r=azrb2c/start', 'fab microsoft', 'a:1:{s:7:".bx-btn";a:1:{s:10:"background";s:18:"#0078d4 !important";}}');
  7. -- Alerts
  8. INSERT INTO `sys_alerts_handlers` SET `name` = 'bx_azrb2c', `class` = 'BxAzrB2CAlerts', `file` = 'modules/boonex/azure_b2c_con/classes/BxAzrB2CAlerts.php';
  9. SET @iHandlerId := (SELECT `id` FROM `sys_alerts_handlers` WHERE `name` = 'bx_azrb2c');
  10. INSERT INTO `sys_alerts` (`unit`, `action`, `handler_id`) VALUES
  11. ('account', 'logout', @iHandlerId),
  12. ('profile', 'delete', @iHandlerId),
  13. ('profile', 'add', @iHandlerId);
  14. -- Options
  15. SET @iTypeOrder = (SELECT MAX(`order`) FROM `sys_options_types` WHERE `group` = 'modules');
  16. INSERT INTO `sys_options_types` (`group`, `name`, `caption`, `icon`, `order`) VALUES
  17. ('modules', 'bx_azrb2c', '_bx_azrb2c_adm_stg_cpt_type', 'bx_azrb2c@modules/boonex/azure_b2c_con/|std-icon.svg', IF(NOT ISNULL(@iTypeOrder), @iTypeOrder + 1, 1));
  18. SET @iTypeId = LAST_INSERT_ID();
  19. INSERT INTO `sys_options_categories` (`type_id`, `name`, `caption`, `order` )
  20. VALUES (@iTypeId, 'bx_azrb2c_general', '_sys_connect_adm_stg_cpt_category_general', 1);
  21. SET @iCategId = LAST_INSERT_ID();
  22. INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `check`, `check_error`, `order`, `extra`) VALUES
  23. ('bx_azrb2c_domain', '', @iCategId, '_bx_azrb2c_option_domain', 'digit', '', '', 10, ''),
  24. ('bx_azrb2c_tenant', '', @iCategId, '_bx_azrb2c_option_tenant', 'digit', '', '', 12, ''),
  25. ('bx_azrb2c_policy', '', @iCategId, '_bx_azrb2c_option_policy', 'digit', '', '', 14, ''),
  26. ('bx_azrb2c_tenant_id', '', @iCategId, '_bx_azrb2c_option_tenant_id', 'digit', '', '', 20, ''),
  27. ('bx_azrb2c_client_id', '', @iCategId, '_bx_azrb2c_option_client_id', 'digit', '', '', 22, ''),
  28. ('bx_azrb2c_secret', '', @iCategId, '_bx_azrb2c_option_secret', 'digit', '', '', 24, ''),
  29. ('bx_azrb2c_redirect_page', 'index', @iCategId, '_sys_connect_option_redirect', 'select', '', '', 40, 'join,settings,dashboard,index'),
  30. ('bx_azrb2c_module', 'bx_persons', @iCategId, '_sys_connect_option_module', 'select', '', '', 50, 'a:2:{s:6:"module";s:9:"bx_azrb2c";s:6:"method";s:20:"get_profiles_modules";}'),
  31. ('bx_azrb2c_privacy', '3', @iCategId, '_sys_connect_option_privacy', 'select', '', '', 54, 'a:2:{s:6:"module";s:12:"bx_azrb2c";s:6:"method";s:18:"get_privacy_groups";}'),
  32. ('bx_azrb2c_confirm_email', 'on', @iCategId, '_sys_connect_option_confirm_email', 'checkbox', '', '', 70, ''),
  33. ('bx_azrb2c_approve', '', @iCategId, '_sys_connect_option_approve', 'checkbox', '', '', 80, ''),
  34. ('bx_azrb2c_group', '', @iCategId, 'bx_azrb2c_option_group', 'digit', '', '', 90, '');
  35. -- Pages
  36. INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES
  37. ('bx_azrb2c_error', 'azrb2c-error', '_bx_azrb2c_error', '_bx_azrb2c_error', 'bx_azrb2c', 5, 2147483647, 0, '', '', '', '', 0, 1, 0, 'BxAzrB2CPage', 'modules/boonex/azure_b2c_con/classes/BxAzrB2CPage.php');
  38. INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES
  39. ('bx_azrb2c_error', 1, 'bx_azrb2c', '_bx_azrb2c_error', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_azrb2c\";s:6:\"method\";s:10:\"last_error\";}', 0, 0, 1, 1);