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;
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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;
/**

View File

@ -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;
/**

View File

@ -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;
/**

View File

@ -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;
/**

View File

@ -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;
/**

View File

@ -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;
/**

View File

@ -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;
/**

View File

@ -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;
/**

View File

@ -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;
/**

View File

@ -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;
/**

View File

@ -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;
/**

View File

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

View File

@ -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;
/**

View File

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

View File

@ -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;
/**

View File

@ -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;
/**

View File

@ -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;
/**

View File

@ -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;

View File

@ -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
{