Move another trait out of obsolete Flarum\Core namespace

This commit is contained in:
Franz Liedke 2017-06-24 14:16:19 +02:00
parent 8aab52327e
commit b48cbde5c0
29 changed files with 44 additions and 46 deletions

View File

@ -11,7 +11,7 @@
namespace Flarum\Admin\Middleware; namespace Flarum\Admin\Middleware;
use Flarum\Core\Access\AssertPermissionTrait; use Flarum\User\AssertPermissionTrait;
use Psr\Http\Message\ResponseInterface as Response; use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request; use Psr\Http\Message\ServerRequestInterface as Request;
use Zend\Stratigility\MiddlewareInterface; use Zend\Stratigility\MiddlewareInterface;

View File

@ -11,7 +11,7 @@
namespace Flarum\Api\Controller; namespace Flarum\Api\Controller;
use Flarum\Core\Access\AssertPermissionTrait; use Flarum\User\AssertPermissionTrait;
use Flarum\Foundation\Application; use Flarum\Foundation\Application;
use Flarum\Settings\SettingsRepositoryInterface; use Flarum\Settings\SettingsRepositoryInterface;
use League\Flysystem\Adapter\Local; use League\Flysystem\Adapter\Local;

View File

@ -11,7 +11,7 @@
namespace Flarum\Api\Controller; namespace Flarum\Api\Controller;
use Flarum\Core\Access\AssertPermissionTrait; use Flarum\User\AssertPermissionTrait;
use Flarum\Foundation\Application; use Flarum\Foundation\Application;
use Flarum\Settings\SettingsRepositoryInterface; use Flarum\Settings\SettingsRepositoryInterface;
use League\Flysystem\Adapter\Local; use League\Flysystem\Adapter\Local;

View File

@ -11,7 +11,7 @@
namespace Flarum\Api\Controller; namespace Flarum\Api\Controller;
use Flarum\Core\Access\AssertPermissionTrait; use Flarum\User\AssertPermissionTrait;
use Flarum\User\EmailToken; use Flarum\User\EmailToken;
use Flarum\User\Exception\PermissionDeniedException; use Flarum\User\Exception\PermissionDeniedException;
use Flarum\Forum\UrlGenerator; use Flarum\Forum\UrlGenerator;

View File

@ -11,7 +11,7 @@
namespace Flarum\Api\Controller; namespace Flarum\Api\Controller;
use Flarum\Core\Access\AssertPermissionTrait; use Flarum\User\AssertPermissionTrait;
use Flarum\Group\Permission; use Flarum\Group\Permission;
use Flarum\Http\Controller\ControllerInterface; use Flarum\Http\Controller\ControllerInterface;
use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Message\ServerRequestInterface;

View File

@ -11,7 +11,7 @@
namespace Flarum\Api\Controller; namespace Flarum\Api\Controller;
use Flarum\Core\Access\AssertPermissionTrait; use Flarum\User\AssertPermissionTrait;
use Flarum\Settings\Event\Serializing; use Flarum\Settings\Event\Serializing;
use Flarum\Settings\Event\Saved; use Flarum\Settings\Event\Saved;
use Flarum\Http\Controller\ControllerInterface; use Flarum\Http\Controller\ControllerInterface;

View File

@ -11,7 +11,7 @@
namespace Flarum\Api\Controller; namespace Flarum\Api\Controller;
use Flarum\Core\Access\AssertPermissionTrait; use Flarum\User\AssertPermissionTrait;
use Flarum\Extension\ExtensionManager; use Flarum\Extension\ExtensionManager;
use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Message\ServerRequestInterface;

View File

@ -11,7 +11,7 @@
namespace Flarum\Api\Controller; namespace Flarum\Api\Controller;
use Flarum\Core\Access\AssertPermissionTrait; use Flarum\User\AssertPermissionTrait;
use Flarum\Extension\ExtensionManager; use Flarum\Extension\ExtensionManager;
use Flarum\Http\Controller\ControllerInterface; use Flarum\Http\Controller\ControllerInterface;
use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Message\ServerRequestInterface;

View File

@ -11,7 +11,7 @@
namespace Flarum\Api\Controller; namespace Flarum\Api\Controller;
use Flarum\Core\Access\AssertPermissionTrait; use Flarum\User\AssertPermissionTrait;
use Flarum\Foundation\Application; use Flarum\Foundation\Application;
use Flarum\Settings\SettingsRepositoryInterface; use Flarum\Settings\SettingsRepositoryInterface;
use Illuminate\Support\Str; use Illuminate\Support\Str;

View File

@ -11,7 +11,7 @@
namespace Flarum\Api\Controller; namespace Flarum\Api\Controller;
use Flarum\Core\Access\AssertPermissionTrait; use Flarum\User\AssertPermissionTrait;
use Flarum\Foundation\Application; use Flarum\Foundation\Application;
use Flarum\Settings\SettingsRepositoryInterface; use Flarum\Settings\SettingsRepositoryInterface;
use Illuminate\Support\Str; use Illuminate\Support\Str;

View File

@ -11,8 +11,7 @@
namespace Flarum\Core\Command; 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\Group;
use Flarum\Foundation\DispatchEventsTrait; use Flarum\Foundation\DispatchEventsTrait;
use Flarum\Group\GroupValidator; use Flarum\Group\GroupValidator;
@ -21,7 +20,7 @@ use Illuminate\Contracts\Events\Dispatcher;
class CreateGroupHandler class CreateGroupHandler
{ {
use Flarum\Foundation\DispatchEventsTrait; use DispatchEventsTrait;
use AssertPermissionTrait; use AssertPermissionTrait;
/** /**

View File

@ -11,7 +11,7 @@
namespace Flarum\Core\Command; namespace Flarum\Core\Command;
use Flarum\Core\Access\AssertPermissionTrait; use Flarum\User\AssertPermissionTrait;
use Flarum\User\Exception\PermissionDeniedException; use Flarum\User\Exception\PermissionDeniedException;
use Flarum\User\UserRepository; use Flarum\User\UserRepository;
use Flarum\Foundation\DispatchEventsTrait; use Flarum\Foundation\DispatchEventsTrait;
@ -21,7 +21,7 @@ use League\Flysystem\FilesystemInterface;
class DeleteAvatarHandler class DeleteAvatarHandler
{ {
use Flarum\Foundation\DispatchEventsTrait; use DispatchEventsTrait;
use AssertPermissionTrait; use AssertPermissionTrait;
/** /**

View File

@ -11,7 +11,7 @@
namespace Flarum\Core\Command; namespace Flarum\Core\Command;
use Flarum\Core\Access\AssertPermissionTrait; use Flarum\User\AssertPermissionTrait;
use Flarum\User\Exception\PermissionDeniedException; use Flarum\User\Exception\PermissionDeniedException;
use Flarum\Discussion\DiscussionRepository; use Flarum\Discussion\DiscussionRepository;
use Flarum\Foundation\DispatchEventsTrait; use Flarum\Foundation\DispatchEventsTrait;
@ -20,7 +20,7 @@ use Illuminate\Contracts\Events\Dispatcher;
class DeleteDiscussionHandler class DeleteDiscussionHandler
{ {
use Flarum\Foundation\DispatchEventsTrait; use DispatchEventsTrait;
use AssertPermissionTrait; use AssertPermissionTrait;
/** /**

View File

@ -11,7 +11,7 @@
namespace Flarum\Core\Command; namespace Flarum\Core\Command;
use Flarum\Core\Access\AssertPermissionTrait; use Flarum\User\AssertPermissionTrait;
use Flarum\User\Exception\PermissionDeniedException; use Flarum\User\Exception\PermissionDeniedException;
use Flarum\Group\GroupRepository; use Flarum\Group\GroupRepository;
use Flarum\Foundation\DispatchEventsTrait; use Flarum\Foundation\DispatchEventsTrait;
@ -20,7 +20,7 @@ use Illuminate\Contracts\Events\Dispatcher;
class DeleteGroupHandler class DeleteGroupHandler
{ {
use Flarum\Foundation\DispatchEventsTrait; use DispatchEventsTrait;
use AssertPermissionTrait; use AssertPermissionTrait;
/** /**

View File

@ -11,7 +11,7 @@
namespace Flarum\Core\Command; namespace Flarum\Core\Command;
use Flarum\Core\Access\AssertPermissionTrait; use Flarum\User\AssertPermissionTrait;
use Flarum\User\Exception\PermissionDeniedException; use Flarum\User\Exception\PermissionDeniedException;
use Flarum\Post\PostRepository; use Flarum\Post\PostRepository;
use Flarum\Foundation\DispatchEventsTrait; use Flarum\Foundation\DispatchEventsTrait;
@ -20,7 +20,7 @@ use Illuminate\Contracts\Events\Dispatcher;
class DeletePostHandler class DeletePostHandler
{ {
use Flarum\Foundation\DispatchEventsTrait; use DispatchEventsTrait;
use AssertPermissionTrait; use AssertPermissionTrait;
/** /**

View File

@ -11,7 +11,7 @@
namespace Flarum\Core\Command; namespace Flarum\Core\Command;
use Flarum\Core\Access\AssertPermissionTrait; use Flarum\User\AssertPermissionTrait;
use Flarum\User\Exception\PermissionDeniedException; use Flarum\User\Exception\PermissionDeniedException;
use Flarum\User\UserRepository; use Flarum\User\UserRepository;
use Flarum\Foundation\DispatchEventsTrait; use Flarum\Foundation\DispatchEventsTrait;
@ -20,7 +20,7 @@ use Illuminate\Contracts\Events\Dispatcher;
class DeleteUserHandler class DeleteUserHandler
{ {
use Flarum\Foundation\DispatchEventsTrait; use DispatchEventsTrait;
use AssertPermissionTrait; use AssertPermissionTrait;
/** /**

View File

@ -11,7 +11,7 @@
namespace Flarum\Core\Command; namespace Flarum\Core\Command;
use Flarum\Core\Access\AssertPermissionTrait; use Flarum\User\AssertPermissionTrait;
use Flarum\User\Exception\PermissionDeniedException; use Flarum\User\Exception\PermissionDeniedException;
use Flarum\Discussion\DiscussionRepository; use Flarum\Discussion\DiscussionRepository;
use Flarum\Foundation\DispatchEventsTrait; use Flarum\Foundation\DispatchEventsTrait;
@ -21,7 +21,7 @@ use Illuminate\Contracts\Events\Dispatcher;
class EditDiscussionHandler class EditDiscussionHandler
{ {
use Flarum\Foundation\DispatchEventsTrait; use DispatchEventsTrait;
use AssertPermissionTrait; use AssertPermissionTrait;
/** /**

View File

@ -11,7 +11,7 @@
namespace Flarum\Core\Command; namespace Flarum\Core\Command;
use Flarum\Core\Access\AssertPermissionTrait; use Flarum\User\AssertPermissionTrait;
use Flarum\User\Exception\PermissionDeniedException; use Flarum\User\Exception\PermissionDeniedException;
use Flarum\Group\Group; use Flarum\Group\Group;
use Flarum\Group\GroupRepository; use Flarum\Group\GroupRepository;
@ -22,7 +22,7 @@ use Illuminate\Contracts\Events\Dispatcher;
class EditGroupHandler class EditGroupHandler
{ {
use Flarum\Foundation\DispatchEventsTrait; use DispatchEventsTrait;
use AssertPermissionTrait; use AssertPermissionTrait;
/** /**

View File

@ -11,7 +11,7 @@
namespace Flarum\Core\Command; namespace Flarum\Core\Command;
use Flarum\Core\Access\AssertPermissionTrait; use Flarum\User\AssertPermissionTrait;
use Flarum\Post\CommentPost; use Flarum\Post\CommentPost;
use Flarum\Post\PostRepository; use Flarum\Post\PostRepository;
use Flarum\Foundation\DispatchEventsTrait; use Flarum\Foundation\DispatchEventsTrait;
@ -21,7 +21,7 @@ use Illuminate\Contracts\Events\Dispatcher;
class EditPostHandler class EditPostHandler
{ {
use Flarum\Foundation\DispatchEventsTrait; use DispatchEventsTrait;
use AssertPermissionTrait; use AssertPermissionTrait;
/** /**

View File

@ -11,7 +11,7 @@
namespace Flarum\Core\Command; namespace Flarum\Core\Command;
use Flarum\Core\Access\AssertPermissionTrait; use Flarum\User\AssertPermissionTrait;
use Flarum\User\UserRepository; use Flarum\User\UserRepository;
use Flarum\Foundation\DispatchEventsTrait; use Flarum\Foundation\DispatchEventsTrait;
use Flarum\User\User; use Flarum\User\User;
@ -22,7 +22,7 @@ use Illuminate\Contracts\Events\Dispatcher;
class EditUserHandler class EditUserHandler
{ {
use Flarum\Foundation\DispatchEventsTrait; use DispatchEventsTrait;
use AssertPermissionTrait; use AssertPermissionTrait;
/** /**

View File

@ -12,7 +12,7 @@
namespace Flarum\Core\Command; namespace Flarum\Core\Command;
use DateTime; use DateTime;
use Flarum\Core\Access\AssertPermissionTrait; use Flarum\User\AssertPermissionTrait;
use Flarum\Core\Notification\NotificationSyncer; use Flarum\Core\Notification\NotificationSyncer;
use Flarum\Post\CommentPost; use Flarum\Post\CommentPost;
use Flarum\Discussion\DiscussionRepository; use Flarum\Discussion\DiscussionRepository;
@ -23,7 +23,7 @@ use Illuminate\Contracts\Events\Dispatcher;
class PostReplyHandler class PostReplyHandler
{ {
use Flarum\Foundation\DispatchEventsTrait; use DispatchEventsTrait;
use AssertPermissionTrait; use AssertPermissionTrait;
/** /**

View File

@ -11,7 +11,7 @@
namespace Flarum\Core\Command; namespace Flarum\Core\Command;
use Flarum\Core\Access\AssertPermissionTrait; use Flarum\User\AssertPermissionTrait;
use Flarum\Core\Repository\NotificationRepository; use Flarum\Core\Repository\NotificationRepository;
class ReadAllNotificationsHandler class ReadAllNotificationsHandler

View File

@ -11,7 +11,7 @@
namespace Flarum\Core\Command; namespace Flarum\Core\Command;
use Flarum\Core\Access\AssertPermissionTrait; use Flarum\User\AssertPermissionTrait;
use Flarum\Discussion\DiscussionRepository; use Flarum\Discussion\DiscussionRepository;
use Flarum\Foundation\DispatchEventsTrait; use Flarum\Foundation\DispatchEventsTrait;
use Flarum\Discussion\Event\UserDataSaving; use Flarum\Discussion\Event\UserDataSaving;
@ -19,7 +19,7 @@ use Illuminate\Contracts\Events\Dispatcher;
class ReadDiscussionHandler class ReadDiscussionHandler
{ {
use Flarum\Foundation\DispatchEventsTrait; use DispatchEventsTrait;
use AssertPermissionTrait; use AssertPermissionTrait;
/** /**

View File

@ -11,7 +11,7 @@
namespace Flarum\Core\Command; namespace Flarum\Core\Command;
use Flarum\Core\Access\AssertPermissionTrait; use Flarum\User\AssertPermissionTrait;
use Flarum\Core\Notification; use Flarum\Core\Notification;
class ReadNotificationHandler class ReadNotificationHandler

View File

@ -12,7 +12,7 @@
namespace Flarum\Core\Command; namespace Flarum\Core\Command;
use Exception; use Exception;
use Flarum\Core\Access\AssertPermissionTrait; use Flarum\User\AssertPermissionTrait;
use Flarum\User\AuthToken; use Flarum\User\AuthToken;
use Flarum\User\Exception\PermissionDeniedException; use Flarum\User\Exception\PermissionDeniedException;
use Flarum\Foundation\DispatchEventsTrait; use Flarum\Foundation\DispatchEventsTrait;
@ -33,7 +33,7 @@ use League\Flysystem\MountManager;
class RegisterUserHandler class RegisterUserHandler
{ {
use Flarum\Foundation\DispatchEventsTrait; use DispatchEventsTrait;
use AssertPermissionTrait; use AssertPermissionTrait;
/** /**

View File

@ -12,7 +12,7 @@
namespace Flarum\Core\Command; namespace Flarum\Core\Command;
use Exception; use Exception;
use Flarum\Core\Access\AssertPermissionTrait; use Flarum\User\AssertPermissionTrait;
use Flarum\Discussion\Discussion; use Flarum\Discussion\Discussion;
use Flarum\Foundation\DispatchEventsTrait; use Flarum\Foundation\DispatchEventsTrait;
use Flarum\Discussion\DiscussionValidator; use Flarum\Discussion\DiscussionValidator;
@ -22,7 +22,7 @@ use Illuminate\Contracts\Events\Dispatcher as EventDispatcher;
class StartDiscussionHandler class StartDiscussionHandler
{ {
use Flarum\Foundation\DispatchEventsTrait; use DispatchEventsTrait;
use AssertPermissionTrait; use AssertPermissionTrait;
/** /**

View File

@ -12,7 +12,7 @@
namespace Flarum\Core\Command; namespace Flarum\Core\Command;
use Exception; use Exception;
use Flarum\Core\Access\AssertPermissionTrait; use Flarum\User\AssertPermissionTrait;
use Flarum\User\UserRepository; use Flarum\User\UserRepository;
use Flarum\Foundation\DispatchEventsTrait; use Flarum\Foundation\DispatchEventsTrait;
use Flarum\User\AvatarValidator; use Flarum\User\AvatarValidator;
@ -29,7 +29,7 @@ use Symfony\Component\HttpFoundation\File\UploadedFile;
class UploadAvatarHandler class UploadAvatarHandler
{ {
use Flarum\Foundation\DispatchEventsTrait; use DispatchEventsTrait;
use AssertPermissionTrait; use AssertPermissionTrait;
/** /**

View File

@ -11,7 +11,7 @@
namespace Flarum\Forum\Controller; namespace Flarum\Forum\Controller;
use Flarum\Core\Access\AssertPermissionTrait; use Flarum\User\AssertPermissionTrait;
use Flarum\User\Event\LoggedOut; use Flarum\User\Event\LoggedOut;
use Flarum\Foundation\Application; use Flarum\Foundation\Application;
use Flarum\Http\Controller\ControllerInterface; use Flarum\Http\Controller\ControllerInterface;

View File

@ -9,10 +9,9 @@
* file that was distributed with this source code. * file that was distributed with this source code.
*/ */
namespace Flarum\Core\Access; namespace Flarum\User;
use Flarum\User\Exception\PermissionDeniedException; use Flarum\User\Exception\PermissionDeniedException;
use Flarum\User\User;
trait AssertPermissionTrait trait AssertPermissionTrait
{ {