mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-10 00:34:50 +00:00
Update AppServiceProvider, add UserFilter observer
This commit is contained in:
parent
8a0e1402dd
commit
a417d9bbad
1 changed files with 5 additions and 2 deletions
|
@ -6,13 +6,15 @@ use App\Observers\{
|
||||||
AvatarObserver,
|
AvatarObserver,
|
||||||
NotificationObserver,
|
NotificationObserver,
|
||||||
StatusHashtagObserver,
|
StatusHashtagObserver,
|
||||||
UserObserver
|
UserObserver,
|
||||||
|
UserFilterObserver,
|
||||||
};
|
};
|
||||||
use App\{
|
use App\{
|
||||||
Avatar,
|
Avatar,
|
||||||
Notification,
|
Notification,
|
||||||
StatusHashtag,
|
StatusHashtag,
|
||||||
User
|
User,
|
||||||
|
UserFilter
|
||||||
};
|
};
|
||||||
use Auth, Horizon, URL;
|
use Auth, Horizon, URL;
|
||||||
use Illuminate\Support\Facades\Blade;
|
use Illuminate\Support\Facades\Blade;
|
||||||
|
@ -35,6 +37,7 @@ class AppServiceProvider extends ServiceProvider
|
||||||
Notification::observe(NotificationObserver::class);
|
Notification::observe(NotificationObserver::class);
|
||||||
StatusHashtag::observe(StatusHashtagObserver::class);
|
StatusHashtag::observe(StatusHashtagObserver::class);
|
||||||
User::observe(UserObserver::class);
|
User::observe(UserObserver::class);
|
||||||
|
UserFilter::observe(UserFilterObserver::class);
|
||||||
|
|
||||||
Horizon::auth(function ($request) {
|
Horizon::auth(function ($request) {
|
||||||
return Auth::check() && $request->user()->is_admin;
|
return Auth::check() && $request->user()->is_admin;
|
||||||
|
|
Loading…
Reference in a new issue