mirror of
https://github.com/flarum/framework.git
synced 2024-11-30 13:36:10 +08:00
Move another trait out of obsolete Flarum\Core namespace
This commit is contained in:
parent
8aab52327e
commit
b48cbde5c0
|
@ -11,7 +11,7 @@
|
|||
|
||||
namespace Flarum\Admin\Middleware;
|
||||
|
||||
use Flarum\Core\Access\AssertPermissionTrait;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
use Zend\Stratigility\MiddlewareInterface;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
namespace Flarum\Api\Controller;
|
||||
|
||||
use Flarum\Core\Access\AssertPermissionTrait;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\Foundation\Application;
|
||||
use Flarum\Settings\SettingsRepositoryInterface;
|
||||
use League\Flysystem\Adapter\Local;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
namespace Flarum\Api\Controller;
|
||||
|
||||
use Flarum\Core\Access\AssertPermissionTrait;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\Foundation\Application;
|
||||
use Flarum\Settings\SettingsRepositoryInterface;
|
||||
use League\Flysystem\Adapter\Local;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
namespace Flarum\Api\Controller;
|
||||
|
||||
use Flarum\Core\Access\AssertPermissionTrait;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\User\EmailToken;
|
||||
use Flarum\User\Exception\PermissionDeniedException;
|
||||
use Flarum\Forum\UrlGenerator;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
namespace Flarum\Api\Controller;
|
||||
|
||||
use Flarum\Core\Access\AssertPermissionTrait;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\Group\Permission;
|
||||
use Flarum\Http\Controller\ControllerInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
namespace Flarum\Api\Controller;
|
||||
|
||||
use Flarum\Core\Access\AssertPermissionTrait;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\Settings\Event\Serializing;
|
||||
use Flarum\Settings\Event\Saved;
|
||||
use Flarum\Http\Controller\ControllerInterface;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
namespace Flarum\Api\Controller;
|
||||
|
||||
use Flarum\Core\Access\AssertPermissionTrait;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\Extension\ExtensionManager;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
namespace Flarum\Api\Controller;
|
||||
|
||||
use Flarum\Core\Access\AssertPermissionTrait;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\Extension\ExtensionManager;
|
||||
use Flarum\Http\Controller\ControllerInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
namespace Flarum\Api\Controller;
|
||||
|
||||
use Flarum\Core\Access\AssertPermissionTrait;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\Foundation\Application;
|
||||
use Flarum\Settings\SettingsRepositoryInterface;
|
||||
use Illuminate\Support\Str;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
namespace Flarum\Api\Controller;
|
||||
|
||||
use Flarum\Core\Access\AssertPermissionTrait;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\Foundation\Application;
|
||||
use Flarum\Settings\SettingsRepositoryInterface;
|
||||
use Illuminate\Support\Str;
|
||||
|
|
|
@ -11,8 +11,7 @@
|
|||
|
||||
namespace Flarum\Core\Command;
|
||||
|
||||
use Flarum\Core\Access\AssertPermissionTrait;
|
||||
use Flarum\User\Exception\PermissionDeniedException;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\Group\Group;
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
use Flarum\Group\GroupValidator;
|
||||
|
@ -21,7 +20,7 @@ use Illuminate\Contracts\Events\Dispatcher;
|
|||
|
||||
class CreateGroupHandler
|
||||
{
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
use DispatchEventsTrait;
|
||||
use AssertPermissionTrait;
|
||||
|
||||
/**
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
namespace Flarum\Core\Command;
|
||||
|
||||
use Flarum\Core\Access\AssertPermissionTrait;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\User\Exception\PermissionDeniedException;
|
||||
use Flarum\User\UserRepository;
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
|
@ -21,7 +21,7 @@ use League\Flysystem\FilesystemInterface;
|
|||
|
||||
class DeleteAvatarHandler
|
||||
{
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
use DispatchEventsTrait;
|
||||
use AssertPermissionTrait;
|
||||
|
||||
/**
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
namespace Flarum\Core\Command;
|
||||
|
||||
use Flarum\Core\Access\AssertPermissionTrait;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\User\Exception\PermissionDeniedException;
|
||||
use Flarum\Discussion\DiscussionRepository;
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
|
@ -20,7 +20,7 @@ use Illuminate\Contracts\Events\Dispatcher;
|
|||
|
||||
class DeleteDiscussionHandler
|
||||
{
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
use DispatchEventsTrait;
|
||||
use AssertPermissionTrait;
|
||||
|
||||
/**
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
namespace Flarum\Core\Command;
|
||||
|
||||
use Flarum\Core\Access\AssertPermissionTrait;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\User\Exception\PermissionDeniedException;
|
||||
use Flarum\Group\GroupRepository;
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
|
@ -20,7 +20,7 @@ use Illuminate\Contracts\Events\Dispatcher;
|
|||
|
||||
class DeleteGroupHandler
|
||||
{
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
use DispatchEventsTrait;
|
||||
use AssertPermissionTrait;
|
||||
|
||||
/**
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
namespace Flarum\Core\Command;
|
||||
|
||||
use Flarum\Core\Access\AssertPermissionTrait;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\User\Exception\PermissionDeniedException;
|
||||
use Flarum\Post\PostRepository;
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
|
@ -20,7 +20,7 @@ use Illuminate\Contracts\Events\Dispatcher;
|
|||
|
||||
class DeletePostHandler
|
||||
{
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
use DispatchEventsTrait;
|
||||
use AssertPermissionTrait;
|
||||
|
||||
/**
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
namespace Flarum\Core\Command;
|
||||
|
||||
use Flarum\Core\Access\AssertPermissionTrait;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\User\Exception\PermissionDeniedException;
|
||||
use Flarum\User\UserRepository;
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
|
@ -20,7 +20,7 @@ use Illuminate\Contracts\Events\Dispatcher;
|
|||
|
||||
class DeleteUserHandler
|
||||
{
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
use DispatchEventsTrait;
|
||||
use AssertPermissionTrait;
|
||||
|
||||
/**
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
namespace Flarum\Core\Command;
|
||||
|
||||
use Flarum\Core\Access\AssertPermissionTrait;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\User\Exception\PermissionDeniedException;
|
||||
use Flarum\Discussion\DiscussionRepository;
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
|
@ -21,7 +21,7 @@ use Illuminate\Contracts\Events\Dispatcher;
|
|||
|
||||
class EditDiscussionHandler
|
||||
{
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
use DispatchEventsTrait;
|
||||
use AssertPermissionTrait;
|
||||
|
||||
/**
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
namespace Flarum\Core\Command;
|
||||
|
||||
use Flarum\Core\Access\AssertPermissionTrait;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\User\Exception\PermissionDeniedException;
|
||||
use Flarum\Group\Group;
|
||||
use Flarum\Group\GroupRepository;
|
||||
|
@ -22,7 +22,7 @@ use Illuminate\Contracts\Events\Dispatcher;
|
|||
|
||||
class EditGroupHandler
|
||||
{
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
use DispatchEventsTrait;
|
||||
use AssertPermissionTrait;
|
||||
|
||||
/**
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
namespace Flarum\Core\Command;
|
||||
|
||||
use Flarum\Core\Access\AssertPermissionTrait;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\Post\CommentPost;
|
||||
use Flarum\Post\PostRepository;
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
|
@ -21,7 +21,7 @@ use Illuminate\Contracts\Events\Dispatcher;
|
|||
|
||||
class EditPostHandler
|
||||
{
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
use DispatchEventsTrait;
|
||||
use AssertPermissionTrait;
|
||||
|
||||
/**
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
namespace Flarum\Core\Command;
|
||||
|
||||
use Flarum\Core\Access\AssertPermissionTrait;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\User\UserRepository;
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
use Flarum\User\User;
|
||||
|
@ -22,7 +22,7 @@ use Illuminate\Contracts\Events\Dispatcher;
|
|||
|
||||
class EditUserHandler
|
||||
{
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
use DispatchEventsTrait;
|
||||
use AssertPermissionTrait;
|
||||
|
||||
/**
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
namespace Flarum\Core\Command;
|
||||
|
||||
use DateTime;
|
||||
use Flarum\Core\Access\AssertPermissionTrait;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\Core\Notification\NotificationSyncer;
|
||||
use Flarum\Post\CommentPost;
|
||||
use Flarum\Discussion\DiscussionRepository;
|
||||
|
@ -23,7 +23,7 @@ use Illuminate\Contracts\Events\Dispatcher;
|
|||
|
||||
class PostReplyHandler
|
||||
{
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
use DispatchEventsTrait;
|
||||
use AssertPermissionTrait;
|
||||
|
||||
/**
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
namespace Flarum\Core\Command;
|
||||
|
||||
use Flarum\Core\Access\AssertPermissionTrait;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\Core\Repository\NotificationRepository;
|
||||
|
||||
class ReadAllNotificationsHandler
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
namespace Flarum\Core\Command;
|
||||
|
||||
use Flarum\Core\Access\AssertPermissionTrait;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\Discussion\DiscussionRepository;
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
use Flarum\Discussion\Event\UserDataSaving;
|
||||
|
@ -19,7 +19,7 @@ use Illuminate\Contracts\Events\Dispatcher;
|
|||
|
||||
class ReadDiscussionHandler
|
||||
{
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
use DispatchEventsTrait;
|
||||
use AssertPermissionTrait;
|
||||
|
||||
/**
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
namespace Flarum\Core\Command;
|
||||
|
||||
use Flarum\Core\Access\AssertPermissionTrait;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\Core\Notification;
|
||||
|
||||
class ReadNotificationHandler
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
namespace Flarum\Core\Command;
|
||||
|
||||
use Exception;
|
||||
use Flarum\Core\Access\AssertPermissionTrait;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\User\AuthToken;
|
||||
use Flarum\User\Exception\PermissionDeniedException;
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
|
@ -33,7 +33,7 @@ use League\Flysystem\MountManager;
|
|||
|
||||
class RegisterUserHandler
|
||||
{
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
use DispatchEventsTrait;
|
||||
use AssertPermissionTrait;
|
||||
|
||||
/**
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
namespace Flarum\Core\Command;
|
||||
|
||||
use Exception;
|
||||
use Flarum\Core\Access\AssertPermissionTrait;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\Discussion\Discussion;
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
use Flarum\Discussion\DiscussionValidator;
|
||||
|
@ -22,7 +22,7 @@ use Illuminate\Contracts\Events\Dispatcher as EventDispatcher;
|
|||
|
||||
class StartDiscussionHandler
|
||||
{
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
use DispatchEventsTrait;
|
||||
use AssertPermissionTrait;
|
||||
|
||||
/**
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
namespace Flarum\Core\Command;
|
||||
|
||||
use Exception;
|
||||
use Flarum\Core\Access\AssertPermissionTrait;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\User\UserRepository;
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
use Flarum\User\AvatarValidator;
|
||||
|
@ -29,7 +29,7 @@ use Symfony\Component\HttpFoundation\File\UploadedFile;
|
|||
|
||||
class UploadAvatarHandler
|
||||
{
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
use DispatchEventsTrait;
|
||||
use AssertPermissionTrait;
|
||||
|
||||
/**
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
namespace Flarum\Forum\Controller;
|
||||
|
||||
use Flarum\Core\Access\AssertPermissionTrait;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\User\Event\LoggedOut;
|
||||
use Flarum\Foundation\Application;
|
||||
use Flarum\Http\Controller\ControllerInterface;
|
||||
|
|
|
@ -9,10 +9,9 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Core\Access;
|
||||
namespace Flarum\User;
|
||||
|
||||
use Flarum\User\Exception\PermissionDeniedException;
|
||||
use Flarum\User\User;
|
||||
|
||||
trait AssertPermissionTrait
|
||||
{
|
Loading…
Reference in New Issue
Block a user