Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
skeeks-semenov committed Dec 24, 2024
1 parent eb71995 commit 07252b4
Showing 1 changed file with 209 additions and 38 deletions.
247 changes: 209 additions & 38 deletions src/config/common.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
'class' => \skeeks\cms\shop\delivery\simple\SimpleDeliveryHandler::class
]
],
'paysystemHandlers' => [
'banktransfer' => [
'class' => \skeeks\cms\shop\paysystem\BankTransferPaysystemHandler::class,
],
],
],
'i18n' => [
'translations' =>
Expand All @@ -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,
Expand All @@ -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', 'Обновление цен, которые рассчитываются автоматически'],
Expand All @@ -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' => [
Expand Down Expand Up @@ -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' => [
[
Expand All @@ -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',
Expand All @@ -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
],
],
],
],
Expand Down

0 comments on commit 07252b4

Please sign in to comment.