wip
This commit is contained in:
@@ -82,7 +82,7 @@ class Category extends Model implements HasMedia, Sortable
|
|||||||
{
|
{
|
||||||
$this->addMediaCollection('uploads')
|
$this->addMediaCollection('uploads')
|
||||||
->singleFile()
|
->singleFile()
|
||||||
->acceptsMimeTypes(['image/jpg', 'image/jpeg', 'image/png'])
|
->acceptsMimeTypes()
|
||||||
->useFallbackUrl(
|
->useFallbackUrl(
|
||||||
sprintf('%s/logo-space.png', config('app.url'))
|
sprintf('%s/logo-space.png', config('app.url'))
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -64,8 +64,8 @@ class ChannelPolicy
|
|||||||
*/
|
*/
|
||||||
public function update(User $user, Channel $channel): Response
|
public function update(User $user, Channel $channel): Response
|
||||||
{
|
{
|
||||||
if ($user->hasRole(['admin'])) {
|
if (tmpostChannel()->slug === $channel->slug) {
|
||||||
return $this->allow();
|
return $this->deny();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->deny();
|
return $this->deny();
|
||||||
|
|||||||
Reference in New Issue
Block a user