From 07252b4bc14f881d37aeae9d02fedecb985a1335 Mon Sep 17 00:00:00 2001 From: Semenov Date: Tue, 24 Dec 2024 10:40:24 +0300 Subject: [PATCH] update --- src/config/common.php | 247 +++++++++++++++++++++++++++++++++++------- 1 file changed, 209 insertions(+), 38 deletions(-) diff --git a/src/config/common.php b/src/config/common.php index 90e6a50..b75470a 100644 --- a/src/config/common.php +++ b/src/config/common.php @@ -19,6 +19,11 @@ 'class' => \skeeks\cms\shop\delivery\simple\SimpleDeliveryHandler::class ] ], + 'paysystemHandlers' => [ + 'banktransfer' => [ + 'class' => \skeeks\cms\shop\paysystem\BankTransferPaysystemHandler::class, + ], + ], ], 'i18n' => [ 'translations' => @@ -42,11 +47,6 @@ 'interval' => 3600 * 6, ], - 'shop/agents/delete-empty-carts' => [ - 'class' => \skeeks\cms\agent\CmsAgent::class, - 'name' => ['skeeks/shop/app', 'Remove empty baskets'], - 'interval' => 3600 * 6, - ], 'shop/flush/price-changes' => [ 'class' => \skeeks\cms\agent\CmsAgent::class, @@ -70,11 +70,7 @@ 'name' => ['skeeks/shop/app', 'Обновление цен из складских цен'], 'interval' => 60 * 60, ], - /*'shop/agents/update-subproducts' => [ - 'class' => \skeeks\cms\agent\CmsAgent::class, - 'name' => ['skeeks/shop/app', 'Обновление данных по вложенным товарам'], - 'interval' => 60 * 5, - ],*/ + 'shop/agents/update-auto-prices' => [ 'class' => \skeeks\cms\agent\CmsAgent::class, 'name' => ['skeeks/shop/app', 'Обновление цен, которые рассчитываются автоматически'], @@ -85,11 +81,127 @@ 'name' => ['skeeks/shop/app', 'Обновление рейтинга, которые рассчитываются автоматически'], 'interval' => 3600, ], + + /** + * SkeekS GPD + */ + 'shop/skeeks-suppliers/update-products' => [ + 'class' => \skeeks\cms\agent\CmsAgent::class, + 'name' => ['app', 'SkeekS GPD - полное обновление товаров'], + 'interval' => 3600*24, + ], + 'shop/skeeks-suppliers/update-store-items' => [ + 'class' => \skeeks\cms\agent\CmsAgent::class, + 'name' => ['app', 'SkeekS GPD - обновить цены и наличие'], + 'interval' => 3600*23, + ], + 'shop/skeeks-suppliers/update-products --product_new_info=1' => [ + 'class' => \skeeks\cms\agent\CmsAgent::class, + 'name' => ['app', 'SkeekS GPD - обновить недавно измененные товары'], + 'interval' => 60*10, + ], + 'shop/skeeks-suppliers/update-store-items --store_new_prices=1' => [ + 'class' => \skeeks\cms\agent\CmsAgent::class, + 'name' => ['app', 'SkeekS GPD - обновить недавно измененные цены и наличие'], + 'interval' => 60*8, + ], + + ], ], 'authManager' => [ 'config' => [ 'roles' => [ + + [ + 'name' => \skeeks\cms\rbac\CmsManager::ROLE_USER, + + //Есть доступ к системе администрирования + 'child' => [ + 'permissions' => [ + 'shop/upa-order', + 'shop/upa-favorite', + ], + ], + ], + + [ + 'name' => \skeeks\cms\rbac\CmsManager::ROLE_EDITOR, + 'child' => [ + + //Есть доступ к системе администрирования + 'permissions' => [ + + "shop/admin-product", + "shop/admin-product/index", + "shop/admin-product/create", + "shop/admin-product/update/own", + "shop/admin-product/join/own", + "shop/admin-product/delete/own", + + "shop/admin-shop-brand", + "shop/admin-shop-brand/index", + "shop/admin-shop-brand/create", + "shop/admin-shop-brand/update/own", + "shop/admin-shop-brand/delete/own", + + "shop/admin-shop-collection", + "shop/admin-shop-collection/index", + "shop/admin-shop-collection/create", + "shop/admin-shop-collection/update/own", + "shop/admin-shop-collection/delete/own", + + ], + ], + ], + + [ + 'name' => \skeeks\cms\rbac\CmsManager::ROLE_MAIN_EDITOR, + 'child' => [ + //Есть доступ к системе администрирования + 'permissions' => [ + + "shop/admin-product", + "shop/admin-product/index", + "shop/admin-product/create", + "shop/admin-product/update", + "shop/admin-product/join", + "shop/admin-product/delete/own", + + "shop/admin-shop-brand", + "shop/admin-shop-brand/index", + "shop/admin-shop-brand/create", + "shop/admin-shop-brand/update", + "shop/admin-shop-brand/delete/own", + + "shop/admin-shop-collection", + "shop/admin-shop-collection/index", + "shop/admin-shop-collection/create", + "shop/admin-shop-collection/update", + "shop/admin-shop-collection/delete/own", + + ], + ], + ], + + [ + 'name' => \skeeks\cms\rbac\CmsManager::ROLE_MANGER, + 'child' => [ + //Есть доступ к системе администрирования + 'permissions' => [ + + "shop/admin-product", + "shop/admin-product/index", + "shop/admin-product/join", + "shop/admin-product/orders", + + "shop/admin-shop-check", + "shop/admin-order", + "shop/admin-payment", + ], + ], + ], + [ 'name' => \skeeks\cms\rbac\CmsManager::ROLE_ADMIN, 'child' => [ @@ -121,37 +233,14 @@ "shop/admin-shop-product-relation", - "shop/admin-cms-site", "shop/admin-discount", ], ], ], - [ - 'name' => \skeeks\cms\rbac\CmsManager::ROLE_MANGER, - 'child' => [ - //Есть доступ к системе администрирования - 'permissions' => [ - "shop/admin-order", - "shop/admin-cart", - "shop/admin-viewed-product", - "shop/admin-quantity-notice-email", - ], - ], - ], - [ - 'name' => \skeeks\cms\rbac\CmsManager::ROLE_USER, - //Есть доступ к системе администрирования - 'child' => [ - 'permissions' => [ - 'shop/upa-order', - 'shop/upa-favorite', - ], - ], - ], ], 'permissions' => [ [ @@ -166,13 +255,10 @@ 'name' => 'shop/admin-shop-cms-content-property', 'description' => ['skeeks/cms', 'Свойства контента в магазине'], ], - [ - 'name' => 'shop/admin-cms-site', - 'description' => 'shop/admin-cms-site', - ], + [ 'name' => 'shop/admin-discount', - 'description' => 'Управление скидками', + 'description' => 'Скидки', ], [ 'name' => 'shop/admin-cart', @@ -190,6 +276,91 @@ 'name' => 'shop/admin-shop-store-product', 'description' => 'Товары склада', ], + + + + /** + * Доступ к элементам + */ + [ + 'name' => 'shop/admin-product', + 'description' => ['skeeks/cms', 'Товары и услуги'], + ], + + [ + 'name' => 'shop/admin-product/index', + 'description' => ['skeeks/cms', 'Товары и услуги | Список'], + ], + + [ + 'name' => 'shop/admin-product/create', + 'description' => ['skeeks/cms', 'Товары и услуги | Добавить'], + ], + + [ + 'name' => 'shop/admin-product/update', + 'description' => ['skeeks/cms', 'Товары и услуги | Редактировать'], + ], + + [ + 'name' => 'shop/admin-product/update/own', + 'description' => ['skeeks/cms', 'Товары и услуги | Редактировать (только свои)'], + 'child' => [ + 'permissions' => [ + 'shop/admin-product/update', + ], + ], + 'ruleName' => \skeeks\cms\rbac\AuthorRule::NAME + ], + + [ + 'name' => 'shop/admin-product/join', + 'description' => ['skeeks/cms', 'Товары и услуги | Объединение, связка'], + ], + + [ + 'name' => 'shop/admin-product/join/own', + 'description' => ['skeeks/cms', 'Товары и услуги | Объединение, связка (только свои)'], + 'child' => [ + 'permissions' => [ + 'shop/admin-product/join', + ], + ], + 'ruleName' => \skeeks\cms\rbac\AuthorRule::NAME + ], + + [ + 'name' => 'shop/admin-product/orders', + 'description' => ['skeeks/cms', 'Товары и услуги | Кто посмотрел, заказал, положил в корзину'], + ], + + /*[ + 'name' => 'shop/admin-product/orders/own', + 'description' => ['skeeks/cms', 'Товары и услуги | Кто посмотрел, заказал, положил в корзину (только свои)'], + 'child' => [ + 'permissions' => [ + 'shop/admin-product/orders', + ], + ], + 'ruleName' => \skeeks\cms\rbac\AuthorRule::NAME + ],*/ + + [ + 'name' => 'shop/admin-product/delete', + 'description' => ['skeeks/cms', 'Товары и услуги | Удалить'], + ], + + + [ + 'name' => 'shop/admin-product/delete/own', + 'description' => ['skeeks/cms', 'Товары и услуги | Удалить (только свои)'], + 'child' => [ + 'permissions' => [ + 'shop/admin-product/delete', + ], + ], + 'ruleName' => \skeeks\cms\rbac\AuthorRule::NAME + ], ], ], ],