diff --git a/app/Http/Controllers/Auth/ConfirmEmailController.php b/app/Access/Controllers/ConfirmEmailController.php similarity index 95% rename from app/Http/Controllers/Auth/ConfirmEmailController.php rename to app/Access/Controllers/ConfirmEmailController.php index fdde8e70c..3fda0586e 100644 --- a/app/Http/Controllers/Auth/ConfirmEmailController.php +++ b/app/Access/Controllers/ConfirmEmailController.php @@ -1,14 +1,14 @@ [ 'users' => [ 'driver' => 'eloquent', - 'model' => \BookStack\Auth\User::class, + 'model' => \BookStack\Users\Models\User::class, ], 'external' => [ 'driver' => 'external-users', - 'model' => \BookStack\Auth\User::class, + 'model' => \BookStack\Users\Models\User::class, ], // 'users' => [ diff --git a/app/Console/Commands/ClearActivity.php b/app/Console/Commands/ClearActivity.php index 932ba7ddd..5ccf6e972 100644 --- a/app/Console/Commands/ClearActivity.php +++ b/app/Console/Commands/ClearActivity.php @@ -2,7 +2,7 @@ namespace BookStack\Console\Commands; -use BookStack\Actions\Activity; +use BookStack\Activity\Models\Activity; use Illuminate\Console\Command; class ClearActivity extends Command diff --git a/app/Console/Commands/ClearViews.php b/app/Console/Commands/ClearViews.php index 0fc6c0195..c76b78d23 100644 --- a/app/Console/Commands/ClearViews.php +++ b/app/Console/Commands/ClearViews.php @@ -2,7 +2,7 @@ namespace BookStack\Console\Commands; -use BookStack\Actions\View; +use BookStack\Activity\Models\View; use Illuminate\Console\Command; class ClearViews extends Command diff --git a/app/Console/Commands/CreateAdmin.php b/app/Console/Commands/CreateAdmin.php index e4660314d..377207ed7 100644 --- a/app/Console/Commands/CreateAdmin.php +++ b/app/Console/Commands/CreateAdmin.php @@ -2,9 +2,9 @@ namespace BookStack\Console\Commands; -use BookStack\Auth\Role; -use BookStack\Auth\UserRepo; use BookStack\Exceptions\NotFoundException; +use BookStack\Users\Models\Role; +use BookStack\Users\UserRepo; use Illuminate\Console\Command; use Illuminate\Support\Facades\Validator; use Illuminate\Support\Str; diff --git a/app/Console/Commands/DeleteUsers.php b/app/Console/Commands/DeleteUsers.php index bc7263c77..c16a5d9a6 100644 --- a/app/Console/Commands/DeleteUsers.php +++ b/app/Console/Commands/DeleteUsers.php @@ -2,8 +2,8 @@ namespace BookStack\Console\Commands; -use BookStack\Auth\User; -use BookStack\Auth\UserRepo; +use BookStack\Users\Models\User; +use BookStack\Users\UserRepo; use Illuminate\Console\Command; class DeleteUsers extends Command diff --git a/app/Console/Commands/RegenerateCommentContent.php b/app/Console/Commands/RegenerateCommentContent.php index 3e25dc8a3..3052559e3 100644 --- a/app/Console/Commands/RegenerateCommentContent.php +++ b/app/Console/Commands/RegenerateCommentContent.php @@ -2,8 +2,8 @@ namespace BookStack\Console\Commands; -use BookStack\Actions\Comment; -use BookStack\Actions\CommentRepo; +use BookStack\Activity\CommentRepo; +use BookStack\Activity\Models\Comment; use Illuminate\Console\Command; use Illuminate\Support\Facades\DB; diff --git a/app/Console/Commands/RegeneratePermissions.php b/app/Console/Commands/RegeneratePermissions.php index efb3535d6..27dd8ea65 100644 --- a/app/Console/Commands/RegeneratePermissions.php +++ b/app/Console/Commands/RegeneratePermissions.php @@ -2,7 +2,7 @@ namespace BookStack\Console\Commands; -use BookStack\Auth\Permissions\JointPermissionBuilder; +use BookStack\Permissions\JointPermissionBuilder; use Illuminate\Console\Command; use Illuminate\Support\Facades\DB; diff --git a/app/Console/Commands/ResetMfa.php b/app/Console/Commands/ResetMfa.php index 9074a4a46..4b1813099 100644 --- a/app/Console/Commands/ResetMfa.php +++ b/app/Console/Commands/ResetMfa.php @@ -2,7 +2,7 @@ namespace BookStack\Console\Commands; -use BookStack\Auth\User; +use BookStack\Users\Models\User; use Illuminate\Console\Command; class ResetMfa extends Command diff --git a/app/Http/Controllers/Api/BookApiController.php b/app/Entities/Controllers/BookApiController.php similarity index 97% rename from app/Http/Controllers/Api/BookApiController.php rename to app/Entities/Controllers/BookApiController.php index d57b48a43..5abac12fb 100644 --- a/app/Http/Controllers/Api/BookApiController.php +++ b/app/Entities/Controllers/BookApiController.php @@ -1,6 +1,6 @@ tags->all()))->generateAsString() . ' ')) \ No newline at end of file +@push('body-class', e((new \BookStack\Activity\Tools\TagClassGenerator($entity->tags->all()))->generateAsString() . ' ')) \ No newline at end of file diff --git a/resources/views/form/entity-permissions.blade.php b/resources/views/form/entity-permissions.blade.php index 9bf309fb8..8eddac8de 100644 --- a/resources/views/form/entity-permissions.blade.php +++ b/resources/views/form/entity-permissions.blade.php @@ -1,5 +1,5 @@
- + - @endforeach + @foreach(request()->only(['order', 'sort']) as $key => $val) + + @endforeach - - - @if(!empty($filters['event'])) - - @endif - - @foreach(['date_from', 'date_to'] as $filterKey) -
- - + - @endforeach -
- - @include('form.user-select', ['user' => $filters['user'] ? \BookStack\Auth\User::query()->find($filters['user']) : null, 'name' => 'user']) -
+ @if(!empty($filters['event'])) + + @endif + + @foreach(['date_from', 'date_to'] as $filterKey) +
+ + +
+ @endforeach + +
+ + @include('form.user-select', ['user' => $filters['user'] ? \BookStack\Users\Models\User::query()->find($filters['user']) : null, 'name' => 'user']) +
-
- - @include('form.text', ['name' => 'ip', 'model' => (object) $filters]) - -
- +
+ + @include('form.text', ['name' => 'ip', 'model' => (object) $filters]) + +
+ -
+
-
-
{{ $activities->links() }}
-
- @include('common.sort', array_merge($listOptions->getSortControlData(), ['useQuery' => true])) -
-
- -
-
-
{{ trans('settings.audit_table_user') }}
-
{{ trans('settings.audit_table_event') }}
-
{{ trans('settings.audit_table_related') }}
-
-
{{ trans('settings.audit_table_ip') }}
-
{{ trans('settings.audit_table_date') }}
+
+
{{ $activities->links() }}
+
+ @include('common.sort', array_merge($listOptions->getSortControlData(), ['useQuery' => true]))
- @foreach($activities as $activity) -
-
- @include('settings.parts.table-user', ['user' => $activity->user, 'user_id' => $activity->user_id]) -
-
{{ trans('settings.audit_table_event') }}: {{ $activity->type }}
-
- @if($activity->entity) - - @icon($activity->entity->getType()) -
- {{ $activity->entity->name }} -
-
- @elseif($activity->detail && $activity->isForEntity()) -
- {{ trans('settings.audit_deleted_item') }}
- {{ trans('settings.audit_deleted_item_name', ['name' => $activity->detail]) }} -
- @elseif($activity->detail) -
{{ $activity->detail }}
- @endif -
+ +
+
+
{{ trans('settings.audit_table_user') }}
+
{{ trans('settings.audit_table_event') }}
+
{{ trans('settings.audit_table_related') }}
-
{{ trans('settings.audit_table_ip') }}:
{{ $activity->ip }}
-
{{ trans('settings.audit_table_date') }}:
{{ $activity->created_at }}
+
{{ trans('settings.audit_table_ip') }}
+
{{ trans('settings.audit_table_date') }}
- @endforeach + @foreach($activities as $activity) +
+
+ @include('settings.parts.table-user', ['user' => $activity->user, 'user_id' => $activity->user_id]) +
+
{{ trans('settings.audit_table_event') }} + : {{ $activity->type }}
+
+ @if($activity->entity) + + @icon($activity->entity->getType()) +
+ {{ $activity->entity->name }} +
+
+ @elseif($activity->detail && $activity->isForEntity()) +
+ {{ trans('settings.audit_deleted_item') }}
+ {{ trans('settings.audit_deleted_item_name', ['name' => $activity->detail]) }} +
+ @elseif($activity->detail) +
{{ $activity->detail }}
+ @endif +
+
+
{{ trans('settings.audit_table_ip') }} + :
{{ $activity->ip }}
+
{{ trans('settings.audit_table_date') }} + :
{{ $activity->created_at }}
+
+
+ @endforeach +
+ +
+ {{ $activities->links() }} +
-
- {{ $activities->links() }} -
- -
@stop diff --git a/resources/views/settings/registration.blade.php b/resources/views/settings/registration.blade.php index e60704aeb..1666cef53 100644 --- a/resources/views/settings/registration.blade.php +++ b/resources/views/settings/registration.blade.php @@ -24,9 +24,12 @@ @endif - has('setting-registration-role')) class="neg" @endif> + + @foreach(\BookStack\Users\Models\Role::all() as $role)