From b7bc192e6ff8c459dcf3c82869ecfec0e7c868cd Mon Sep 17 00:00:00 2001 From: Nurmuhammet Allanov Date: Mon, 2 Mar 2026 07:01:14 +0500 Subject: [PATCH] wip --- app/Models/Ecommerce/Product/Category/Category.php | 2 +- app/Policies/Ecommerce/Channel/ChannelPolicy.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Models/Ecommerce/Product/Category/Category.php b/app/Models/Ecommerce/Product/Category/Category.php index a880d96..1af4f7c 100644 --- a/app/Models/Ecommerce/Product/Category/Category.php +++ b/app/Models/Ecommerce/Product/Category/Category.php @@ -82,7 +82,7 @@ class Category extends Model implements HasMedia, Sortable { $this->addMediaCollection('uploads') ->singleFile() - ->acceptsMimeTypes(['image/jpg', 'image/jpeg', 'image/png']) + ->acceptsMimeTypes() ->useFallbackUrl( sprintf('%s/logo-space.png', config('app.url')) ); diff --git a/app/Policies/Ecommerce/Channel/ChannelPolicy.php b/app/Policies/Ecommerce/Channel/ChannelPolicy.php index 2ae4000..87fd0bc 100644 --- a/app/Policies/Ecommerce/Channel/ChannelPolicy.php +++ b/app/Policies/Ecommerce/Channel/ChannelPolicy.php @@ -64,8 +64,8 @@ class ChannelPolicy */ public function update(User $user, Channel $channel): Response { - if ($user->hasRole(['admin'])) { - return $this->allow(); + if (tmpostChannel()->slug === $channel->slug) { + return $this->deny(); } return $this->deny();