mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-18 18:40:12 +00:00
Separated providers.
This commit is contained in:
@@ -1,25 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
|
||||||
* AuthServiceProvider.php
|
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
|
||||||
*
|
|
||||||
* This software may be modified and distributed under the terms of the
|
|
||||||
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
|
||||||
*
|
|
||||||
* See the LICENSE file for details.
|
|
||||||
*/
|
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
namespace FireflyIII\Providers;
|
namespace FireflyIII\Providers;
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Gate;
|
||||||
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
|
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
|
||||||
|
|
||||||
/**
|
|
||||||
* Class AuthServiceProvider
|
|
||||||
*
|
|
||||||
* @package FireflyIII\Providers
|
|
||||||
*/
|
|
||||||
class AuthServiceProvider extends ServiceProvider
|
class AuthServiceProvider extends ServiceProvider
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
@@ -27,10 +12,9 @@ class AuthServiceProvider extends ServiceProvider
|
|||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $policies
|
protected $policies = [
|
||||||
= [
|
'FireflyIII\Model' => 'FireflyIII\Policies\ModelPolicy',
|
||||||
'FireflyIII\Model' => 'FireflyIII\Policies\ModelPolicy',
|
];
|
||||||
];
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register any authentication / authorization services.
|
* Register any authentication / authorization services.
|
||||||
|
@@ -1,25 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
|
||||||
* BroadcastServiceProvider.php
|
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
|
||||||
*
|
|
||||||
* This software may be modified and distributed under the terms of the
|
|
||||||
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
|
||||||
*
|
|
||||||
* See the LICENSE file for details.
|
|
||||||
*/
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
namespace FireflyIII\Providers;
|
namespace FireflyIII\Providers;
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Broadcast;
|
|
||||||
use Illuminate\Support\ServiceProvider;
|
use Illuminate\Support\ServiceProvider;
|
||||||
|
use Illuminate\Support\Facades\Broadcast;
|
||||||
|
|
||||||
/**
|
|
||||||
* Class BroadcastServiceProvider
|
|
||||||
*
|
|
||||||
* @package FireflyIII\Providers
|
|
||||||
*/
|
|
||||||
class BroadcastServiceProvider extends ServiceProvider
|
class BroadcastServiceProvider extends ServiceProvider
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
@@ -31,13 +16,6 @@ class BroadcastServiceProvider extends ServiceProvider
|
|||||||
{
|
{
|
||||||
Broadcast::routes();
|
Broadcast::routes();
|
||||||
|
|
||||||
/*
|
require base_path('routes/channels.php');
|
||||||
* Authenticate the user's personal channel...
|
|
||||||
*/
|
|
||||||
Broadcast::channel(
|
|
||||||
'App.User.*', function ($user, $userId) {
|
|
||||||
return (int)$user->id === (int)$userId;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user