From 7ab119fbaac4fc90573439c0bcdc126cf7ddea22 Mon Sep 17 00:00:00 2001 From: Franck Allimant Date: Thu, 24 Apr 2014 12:28:52 +0200 Subject: [PATCH] Added missing permissions --- setup/insert.sql | 22 +++++++++++++++-- setup/update/2.0.1.sql | 54 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+), 2 deletions(-) diff --git a/setup/insert.sql b/setup/insert.sql index 5352e4d83..cb086e650 100644 --- a/setup/insert.sql +++ b/setup/insert.sql @@ -1271,7 +1271,13 @@ INSERT INTO resource (`id`, `code`, `created_at`, `updated_at`) VALUES (23, 'admin.configuration.template', NOW(), NOW()), (24, 'admin.configuration.system-log', NOW(), NOW()), (25, 'admin.cache', NOW(), NOW()), -(26, 'admin.home', NOW(), NOW()); +(26, 'admin.home', NOW(), NOW()), +(27, 'admin.configuration.store', NOW(), NOW()), +(28, 'admin.configuration.variable', NOW(), NOW()), +(29, 'admin.configuration.admin-logs', NOW(), NOW()), +(30, 'admin.configuration.system-logs', NOW(), NOW()), +(31, 'admin.configuration.advanced', NOW(), NOW()), +(32, 'admin.configuration.translations', NOW(), NOW()); /** generated with command : php Thelia thelia:generate-resources --output sql-i18n @@ -1328,7 +1334,19 @@ INSERT INTO resource_i18n (`id`, `locale`, `title`) VALUES (25, 'en_US', 'Configuration / Cache'), (25, 'fr_FR', 'Configuration / Cache'), (26, 'en_US', 'Back-office home page'), -(26, 'fr_FR', 'Page d''acceuil de l''administration'); +(26, 'fr_FR', 'Page d''acceuil de l''administration') +(27, 'en_US', 'Store information configuration'), +(27, 'fr_FR', 'Informations sur la boutique'), +(28, 'en_US', 'Configuration variables'), +(28, 'fr_FR', 'Variables de configuration'), +(29, 'en_US', 'View administration logs'), +(29, 'fr_FR', 'Consulter les logs d''administration'), +(30, 'en_US', 'Logging system configuration'), +(30, 'fr_FR', 'Configuration du système de log'), +(31, 'en_US', 'Advanced configuration'), +(31, 'fr_FR', 'Configuration avancée'), +(32, 'en_US', 'Translations'), +(32, 'fr_FR', 'Traductions'); INSERT INTO `message` (`id`, `name`, `secured`, `text_layout_file_name`, `text_template_file_name`, `html_layout_file_name`, `html_template_file_name`, `created_at`, `updated_at`) VALUES diff --git a/setup/update/2.0.1.sql b/setup/update/2.0.1.sql index 809007107..e1bf8e310 100644 --- a/setup/update/2.0.1.sql +++ b/setup/update/2.0.1.sql @@ -9,5 +9,59 @@ UPDATE `config` SET `value`='' WHERE `name`='thelia_extra_version'; ALTER TABLE `module` ADD INDEX `idx_module_activate` (`activate`); +SELECT @max := MAX(`id`) FROM `resource`; +SET @max := @max+1; + +INSERT INTO resource (`id`, `code`, `created_at`, `updated_at`) VALUES +(@max, 'admin.configuration.store', NOW(), NOW()); + +INSERT INTO resource_i18n (`id`, `locale`, `title`) VALUES +(@max, 'en_US', 'Store information configuration'), +(@max, 'fr_FR', 'Informations sur la boutique'); + +SET @max := @max+1; + +INSERT INTO resource (`id`, `code`, `created_at`, `updated_at`) VALUES +(@max, 'admin.configuration.variable', NOW(), NOW()); + +INSERT INTO resource_i18n (`id`, `locale`, `title`) VALUES +(@max, 'en_US', 'Configuration variables'), +(@max, 'fr_FR', 'Variables de configuration'); + +SET @max := @max+1; + +INSERT INTO resource (`id`, `code`, `created_at`, `updated_at`) VALUES + (@max, 'admin.configuration.admin-logs', NOW(), NOW()); + +INSERT INTO resource_i18n (`id`, `locale`, `title`) VALUES + (@max, 'en_US', 'View administration logs'), + (@max, 'fr_FR', 'Consulter les logs d\'administration'); + +SET @max := @max+1; + +INSERT INTO resource (`id`, `code`, `created_at`, `updated_at`) VALUES + (@max, 'admin.configuration.system-logs', NOW(), NOW()); + +INSERT INTO resource_i18n (`id`, `locale`, `title`) VALUES + (@max, 'en_US', 'Logging system configuration'), + (@max, 'fr_FR', 'Configuration du système de log'); + +SET @max := @max+1; + +INSERT INTO resource (`id`, `code`, `created_at`, `updated_at`) VALUES + (@max, 'admin.configuration.advanced', NOW(), NOW()); + +INSERT INTO resource_i18n (`id`, `locale`, `title`) VALUES + (@max, 'en_US', 'Advanced configuration'), + (@max, 'fr_FR', 'Configuration avancée'); + +SET @max := @max+1; + +INSERT INTO resource (`id`, `code`, `created_at`, `updated_at`) VALUES + (@max, 'admin.configuration.translations', NOW(), NOW()); + +INSERT INTO resource_i18n (`id`, `locale`, `title`) VALUES + (@max, 'en_US', 'Translations'), + (@max, 'fr_FR', 'Traductions'); SET FOREIGN_KEY_CHECKS = 1;