Added 2.1.8 update listener..

This commit is contained in:
Cüneyt Şentürk 2021-03-18 16:42:28 +03:00
parent 87e209b3f3
commit 449ec2f69b
2 changed files with 45 additions and 0 deletions

View File

@ -0,0 +1,44 @@
<?php
namespace App\Listeners\Update\V21;
use App\Abstracts\Listeners\Update as Listener;
use App\Events\Install\UpdateFinished as Event;
use App\Traits\Permissions;
class Version218 extends Listener
{
use Permissions;
const ALIAS = 'core';
const VERSION = '2.1.8';
/**
* Handle the event.
*
* @param $event
* @return void
*/
public function handle(Event $event)
{
if ($this->skipThisUpdate($event)) {
return;
}
$this->updatePermissions();
}
public function updatePermissions()
{
// c=create, r=read, u=update, d=delete
$this->attachPermissionsByRoleNames([
'admin' => [
'widgets-currencies' => 'r',
],
'manager' => [
'widgets-currencies' => 'r',
],
]);
}
}

View File

@ -28,6 +28,7 @@ class Event extends Provider
'App\Listeners\Update\V20\Version2024', 'App\Listeners\Update\V20\Version2024',
'App\Listeners\Update\V21\Version210', 'App\Listeners\Update\V21\Version210',
'App\Listeners\Update\V21\Version213', 'App\Listeners\Update\V21\Version213',
'App\Listeners\Update\V21\Version218',
], ],
'Illuminate\Auth\Events\Login' => [ 'Illuminate\Auth\Events\Login' => [
'App\Listeners\Auth\Login', 'App\Listeners\Auth\Login',