Added 2.1.8 update listener..
This commit is contained in:
parent
87e209b3f3
commit
449ec2f69b
44
app/Listeners/Update/V21/Version218.php
Normal file
44
app/Listeners/Update/V21/Version218.php
Normal 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',
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
@ -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',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user