From b493becadfd0acf177decb796b460f92ca56f4e1 Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Wed, 30 Dec 2020 18:25:35 +0000 Subject: [PATCH 01/11] Started change for entities to have concept of owners --- app/Actions/Comment.php | 14 +++--- app/Auth/Permissions/PermissionService.php | 42 ++++++++-------- app/Entities/Models/Entity.php | 8 ++- app/Http/Controllers/Controller.php | 5 +- .../HasCreatorAndUpdater.php} | 11 ++--- app/Traits/HasOwner.php | 19 +++++++ app/Uploads/Attachment.php | 7 ++- app/Uploads/Image.php | 6 ++- app/helpers.php | 4 +- ..._173528_add_owned_by_field_to_entities.php | 49 +++++++++++++++++++ resources/lang/en/entities.php | 1 + .../views/partials/entity-meta.blade.php | 42 +++++++++++----- 12 files changed, 151 insertions(+), 57 deletions(-) rename app/{Ownable.php => Traits/HasCreatorAndUpdater.php} (59%) create mode 100644 app/Traits/HasOwner.php create mode 100644 database/migrations/2020_12_30_173528_add_owned_by_field_to_entities.php diff --git a/app/Actions/Comment.php b/app/Actions/Comment.php index 655d45221..f5269e253 100644 --- a/app/Actions/Comment.php +++ b/app/Actions/Comment.php @@ -1,6 +1,8 @@ morphTo('entity'); } /** * Check if a comment has been updated since creation. - * @return bool */ - public function isUpdated() + public function isUpdated(): bool { return $this->updated_at->timestamp > $this->created_at->timestamp; } diff --git a/app/Auth/Permissions/PermissionService.php b/app/Auth/Permissions/PermissionService.php index 5f4648d58..bd4066936 100644 --- a/app/Auth/Permissions/PermissionService.php +++ b/app/Auth/Permissions/PermissionService.php @@ -5,7 +5,9 @@ use BookStack\Auth\Role; use BookStack\Entities\Models\Book; use BookStack\Entities\Models\Entity; use BookStack\Entities\EntityProvider; -use BookStack\Ownable; +use BookStack\Model; +use BookStack\Traits\HasCreatorAndUpdater; +use BookStack\Traits\HasOwner; use Illuminate\Database\Connection; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Query\Builder as QueryBuilder; @@ -168,7 +170,7 @@ class PermissionService }); // Chunk through all bookshelves - $this->entityProvider->bookshelf->newQuery()->withTrashed()->select(['id', 'restricted', 'created_by']) + $this->entityProvider->bookshelf->newQuery()->withTrashed()->select(['id', 'restricted', 'owned_by']) ->chunk(50, function ($shelves) use ($roles) { $this->buildJointPermissionsForShelves($shelves, $roles); }); @@ -181,10 +183,10 @@ class PermissionService protected function bookFetchQuery() { return $this->entityProvider->book->withTrashed()->newQuery() - ->select(['id', 'restricted', 'created_by'])->with(['chapters' => function ($query) { - $query->withTrashed()->select(['id', 'restricted', 'created_by', 'book_id']); + ->select(['id', 'restricted', 'owned_by'])->with(['chapters' => function ($query) { + $query->withTrashed()->select(['id', 'restricted', 'owned_by', 'book_id']); }, 'pages' => function ($query) { - $query->withTrashed()->select(['id', 'restricted', 'created_by', 'book_id', 'chapter_id']); + $query->withTrashed()->select(['id', 'restricted', 'owned_by', 'book_id', 'chapter_id']); }]); } @@ -286,7 +288,7 @@ class PermissionService }); // Chunk through all bookshelves - $this->entityProvider->bookshelf->newQuery()->select(['id', 'restricted', 'created_by']) + $this->entityProvider->bookshelf->newQuery()->select(['id', 'restricted', 'owned_by']) ->chunk(50, function ($shelves) use ($roles) { $this->buildJointPermissionsForShelves($shelves, $roles); }); @@ -508,28 +510,24 @@ class PermissionService 'action' => $action, 'has_permission' => $permissionAll, 'has_permission_own' => $permissionOwn, - 'created_by' => $entity->getRawAttribute('created_by') + 'owned_by' => $entity->getRawAttribute('owned_by') ]; } /** * Checks if an entity has a restriction set upon it. - * @param Ownable $ownable - * @param $permission - * @return bool + * @param HasCreatorAndUpdater|HasOwner $ownable */ - public function checkOwnableUserAccess(Ownable $ownable, $permission) + public function checkOwnableUserAccess(Model $ownable, string $permission): bool { $explodedPermission = explode('-', $permission); - $baseQuery = $ownable->where('id', '=', $ownable->id); + $baseQuery = $ownable->newQuery()->where('id', '=', $ownable->id); $action = end($explodedPermission); $this->currentAction = $action; - $nonJointPermissions = ['restrictions', 'image', 'attachment', 'comment']; - // Handle non entity specific jointPermissions - if (in_array($explodedPermission[0], $nonJointPermissions)) { + if (!($ownable instanceof Entity)) { $allPermission = $this->currentUser() && $this->currentUser()->can($permission . '-all'); $ownPermission = $this->currentUser() && $this->currentUser()->can($permission . '-own'); $this->currentAction = 'view'; @@ -566,7 +564,7 @@ class PermissionService $query->where('has_permission', '=', 1) ->orWhere(function ($query2) use ($userId) { $query2->where('has_permission_own', '=', 1) - ->where('created_by', '=', $userId); + ->where('owned_by', '=', $userId); }); }); @@ -615,7 +613,7 @@ class PermissionService $query->where('has_permission', '=', true) ->orWhere(function ($query) { $query->where('has_permission_own', '=', true) - ->where('created_by', '=', $this->currentUser()->id); + ->where('owned_by', '=', $this->currentUser()->id); }); }); }); @@ -639,7 +637,7 @@ class PermissionService $query->where('has_permission', '=', true) ->orWhere(function (Builder $query) { $query->where('has_permission_own', '=', true) - ->where('created_by', '=', $this->currentUser()->id); + ->where('owned_by', '=', $this->currentUser()->id); }); }); }); @@ -656,7 +654,7 @@ class PermissionService $query->where('draft', '=', false) ->orWhere(function (Builder $query) { $query->where('draft', '=', true) - ->where('created_by', '=', $this->currentUser()->id); + ->where('owned_by', '=', $this->currentUser()->id); }); }); } @@ -676,7 +674,7 @@ class PermissionService $query->where('draft', '=', false) ->orWhere(function ($query) { $query->where('draft', '=', true) - ->where('created_by', '=', $this->currentUser()->id); + ->where('owned_by', '=', $this->currentUser()->id); }); }); } @@ -710,7 +708,7 @@ class PermissionService ->where(function ($query) { $query->where('has_permission', '=', true)->orWhere(function ($query) { $query->where('has_permission_own', '=', true) - ->where('created_by', '=', $this->currentUser()->id); + ->where('owned_by', '=', $this->currentUser()->id); }); }); }); @@ -746,7 +744,7 @@ class PermissionService ->where(function ($query) { $query->where('has_permission', '=', true)->orWhere(function ($query) { $query->where('has_permission_own', '=', true) - ->where('created_by', '=', $this->currentUser()->id); + ->where('owned_by', '=', $this->currentUser()->id); }); }); }); diff --git a/app/Entities/Models/Entity.php b/app/Entities/Models/Entity.php index e681a4e22..c6b2468b0 100644 --- a/app/Entities/Models/Entity.php +++ b/app/Entities/Models/Entity.php @@ -9,7 +9,9 @@ use BookStack\Auth\Permissions\JointPermission; use BookStack\Entities\Tools\SearchIndex; use BookStack\Entities\Tools\SlugGenerator; use BookStack\Facades\Permissions; -use BookStack\Ownable; +use BookStack\Model; +use BookStack\Traits\HasCreatorAndUpdater; +use BookStack\Traits\HasOwner; use Carbon\Carbon; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Collection; @@ -35,9 +37,11 @@ use Illuminate\Database\Eloquent\SoftDeletes; * @method static Builder withLastView() * @method static Builder withViewCount() */ -abstract class Entity extends Ownable +abstract class Entity extends Model { use SoftDeletes; + use HasCreatorAndUpdater; + use HasOwner; /** * @var string - Name of property where the main text content is found diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php index 758c85dda..479d5ac15 100644 --- a/app/Http/Controllers/Controller.php +++ b/app/Http/Controllers/Controller.php @@ -4,7 +4,8 @@ namespace BookStack\Http\Controllers; use BookStack\Facades\Activity; use BookStack\Interfaces\Loggable; -use BookStack\Ownable; +use BookStack\HasCreatorAndUpdater; +use BookStack\Model; use Illuminate\Foundation\Bus\DispatchesJobs; use Illuminate\Foundation\Validation\ValidatesRequests; use Illuminate\Http\Exceptions\HttpResponseException; @@ -72,7 +73,7 @@ abstract class Controller extends BaseController /** * Check the current user's permissions against an ownable item otherwise throw an exception. */ - protected function checkOwnablePermission(string $permission, Ownable $ownable): void + protected function checkOwnablePermission(string $permission, Model $ownable): void { if (!userCan($permission, $ownable)) { $this->showPermissionError(); diff --git a/app/Ownable.php b/app/Traits/HasCreatorAndUpdater.php similarity index 59% rename from app/Ownable.php rename to app/Traits/HasCreatorAndUpdater.php index b118bc742..ad6c3035f 100644 --- a/app/Ownable.php +++ b/app/Traits/HasCreatorAndUpdater.php @@ -1,27 +1,26 @@ -belongsTo(User::class, 'created_by'); } /** * Relation for the user that updated this entity. - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function updatedBy() + public function updatedBy(): BelongsTo { return $this->belongsTo(User::class, 'updated_by'); } diff --git a/app/Traits/HasOwner.php b/app/Traits/HasOwner.php new file mode 100644 index 000000000..9d1eb3df7 --- /dev/null +++ b/app/Traits/HasOwner.php @@ -0,0 +1,19 @@ +belongsTo(User::class, 'owned_by'); + } + +} diff --git a/app/Uploads/Attachment.php b/app/Uploads/Attachment.php index 77c7925db..d1060477d 100644 --- a/app/Uploads/Attachment.php +++ b/app/Uploads/Attachment.php @@ -1,7 +1,8 @@ can($permission); diff --git a/database/migrations/2020_12_30_173528_add_owned_by_field_to_entities.php b/database/migrations/2020_12_30_173528_add_owned_by_field_to_entities.php new file mode 100644 index 000000000..bf8bf281f --- /dev/null +++ b/database/migrations/2020_12_30_173528_add_owned_by_field_to_entities.php @@ -0,0 +1,49 @@ +integer('owned_by')->unsigned()->index(); + }); + + DB::table($table)->update(['owned_by' => DB::raw('`created_by`')]); + } + + Schema::table('joint_permissions', function (Blueprint $table) { + $table->renameColumn('created_by', 'owned_by'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + $tables = ['pages', 'books', 'chapters', 'bookshelves']; + foreach ($tables as $table) { + Schema::table($table, function (Blueprint $table) { + $table->dropColumn('owned_by'); + }); + } + + Schema::table('joint_permissions', function (Blueprint $table) { + $table->renameColumn('owned_by', 'created_by'); + }); + } +} diff --git a/resources/lang/en/entities.php b/resources/lang/en/entities.php index 485ecb7bc..5e6a63deb 100644 --- a/resources/lang/en/entities.php +++ b/resources/lang/en/entities.php @@ -22,6 +22,7 @@ return [ 'meta_created_name' => 'Created :timeLength by :user', 'meta_updated' => 'Updated :timeLength', 'meta_updated_name' => 'Updated :timeLength by :user', + 'meta_owned_name' => 'Owned by :user', 'entity_select' => 'Entity Select', 'images' => 'Images', 'my_recent_drafts' => 'My Recent Drafts', diff --git a/resources/views/partials/entity-meta.blade.php b/resources/views/partials/entity-meta.blade.php index f759ea25b..8996df9bb 100644 --- a/resources/views/partials/entity-meta.blade.php +++ b/resources/views/partials/entity-meta.blade.php @@ -1,34 +1,50 @@
@if($entity->isA('revision')) - @icon('history'){{ trans('entities.pages_revision') }} - {{ trans('entities.pages_revisions_number') }}{{ $entity->revision_number == 0 ? '' : $entity->revision_number }} -
+
+ @icon('history'){{ trans('entities.pages_revision') }} + {{ trans('entities.pages_revisions_number') }}{{ $entity->revision_number == 0 ? '' : $entity->revision_number }} +
@endif @if ($entity->isA('page')) - @if (userCan('page-update', $entity)) @endif - @icon('history'){{ trans('entities.meta_revision', ['revisionCount' => $entity->revision_count]) }}
+
+ @if (userCan('page-update', $entity)) @endif + @icon('history'){{ trans('entities.meta_revision', ['revisionCount' => $entity->revision_count]) }} @if (userCan('page-update', $entity))@endif +
@endif + @if ($entity->ownedBy && $entity->ownedBy->id !== $entity->createdBy->id) +
+ @icon('user'){!! trans('entities.meta_owned_name', [ + 'user' => "".e($entity->ownedBy->name). "" + ]) !!} +
+ @endif @if ($entity->createdBy) - @icon('star'){!! trans('entities.meta_created_name', [ +
+ @icon('star'){!! trans('entities.meta_created_name', [ 'timeLength' => ''.$entity->created_at->diffForHumans() . '', - 'user' => "".htmlentities($entity->createdBy->name). "" + 'user' => "".e($entity->createdBy->name). "" ]) !!} +
@else - @icon('star'){{ trans('entities.meta_created', ['timeLength' => $entity->created_at->diffForHumans()]) }} +
+ @icon('star'){{ trans('entities.meta_created', ['timeLength' => $entity->created_at->diffForHumans()]) }} +
@endif -
- @if ($entity->updatedBy) - @icon('edit'){!! trans('entities.meta_updated_name', [ +
+ @icon('edit'){!! trans('entities.meta_updated_name', [ 'timeLength' => '' . $entity->updated_at->diffForHumans() .'', - 'user' => "".htmlentities($entity->updatedBy->name). "" + 'user' => "".e($entity->updatedBy->name). "" ]) !!} +
@elseif (!$entity->isA('revision')) - @icon('edit'){{ trans('entities.meta_updated', ['timeLength' => $entity->updated_at->diffForHumans()]) }} +
+ @icon('edit'){{ trans('entities.meta_updated', ['timeLength' => $entity->updated_at->diffForHumans()]) }} +
@endif
\ No newline at end of file From 4c580d1571958a2a8e2a32292f813628296ca215 Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Wed, 30 Dec 2020 22:18:28 +0000 Subject: [PATCH 02/11] Added owners to entity creation and updated tests --- app/Auth/Permissions/PermissionService.php | 4 ++- app/Entities/Repos/BaseRepo.php | 1 + app/Entities/Repos/PageRepo.php | 1 + tests/BrowserKitTest.php | 38 ++++++++++++---------- tests/Entity/SortTest.php | 2 +- tests/Permissions/RolesTest.php | 4 +-- 6 files changed, 29 insertions(+), 21 deletions(-) diff --git a/app/Auth/Permissions/PermissionService.php b/app/Auth/Permissions/PermissionService.php index bd4066936..d858a7c18 100644 --- a/app/Auth/Permissions/PermissionService.php +++ b/app/Auth/Permissions/PermissionService.php @@ -526,8 +526,10 @@ class PermissionService $action = end($explodedPermission); $this->currentAction = $action; + $nonJointPermissions = ['restrictions', 'image', 'attachment', 'comment']; + // Handle non entity specific jointPermissions - if (!($ownable instanceof Entity)) { + if (in_array($explodedPermission[0], $nonJointPermissions)) { $allPermission = $this->currentUser() && $this->currentUser()->can($permission . '-all'); $ownPermission = $this->currentUser() && $this->currentUser()->can($permission . '-own'); $this->currentAction = 'view'; diff --git a/app/Entities/Repos/BaseRepo.php b/app/Entities/Repos/BaseRepo.php index ff4fc635b..f93271430 100644 --- a/app/Entities/Repos/BaseRepo.php +++ b/app/Entities/Repos/BaseRepo.php @@ -34,6 +34,7 @@ class BaseRepo $entity->forceFill([ 'created_by' => user()->id, 'updated_by' => user()->id, + 'owned_by' => user()->id, ]); $entity->refreshSlug(); $entity->save(); diff --git a/app/Entities/Repos/PageRepo.php b/app/Entities/Repos/PageRepo.php index 153ef8575..f664d2126 100644 --- a/app/Entities/Repos/PageRepo.php +++ b/app/Entities/Repos/PageRepo.php @@ -130,6 +130,7 @@ class PageRepo $page = (new Page())->forceFill([ 'name' => trans('entities.pages_initial_name'), 'created_by' => user()->id, + 'owned_by' => user()->id, 'updated_by' => user()->id, 'draft' => true, ]); diff --git a/tests/BrowserKitTest.php b/tests/BrowserKitTest.php index bb5aaa031..a6c461c44 100644 --- a/tests/BrowserKitTest.php +++ b/tests/BrowserKitTest.php @@ -1,10 +1,16 @@ get()->last(); + return User::where('system_name', '=', null)->get()->last(); } /** @@ -64,23 +70,21 @@ abstract class BrowserKitTest extends TestCase /** * Create a group of entities that belong to a specific user. - * @param $creatorUser - * @param $updaterUser - * @return array */ - protected function createEntityChainBelongingToUser($creatorUser, $updaterUser = false) + protected function createEntityChainBelongingToUser(User $creatorUser, ?User $updaterUser): array { - if ($updaterUser === false) $updaterUser = $creatorUser; - $book = factory(\BookStack\Entities\Models\Book::class)->create(['created_by' => $creatorUser->id, 'updated_by' => $updaterUser->id]); - $chapter = factory(\BookStack\Entities\Models\Chapter::class)->create(['created_by' => $creatorUser->id, 'updated_by' => $updaterUser->id, 'book_id' => $book->id]); - $page = factory(\BookStack\Entities\Models\Page::class)->create(['created_by' => $creatorUser->id, 'updated_by' => $updaterUser->id, 'book_id' => $book->id, 'chapter_id' => $chapter->id]); + if (empty($updaterUser)) { + $updaterUser = $creatorUser; + } + + $userAttrs = ['created_by' => $creatorUser->id, 'owned_by' => $creatorUser->id, 'updated_by' => $updaterUser->id]; + $book = factory(Book::class)->create($userAttrs); + $chapter = factory(Chapter::class)->create(array_merge(['book_id' => $book->id], $userAttrs)); + $page = factory(Page::class)->create(array_merge(['book_id' => $book->id, 'chapter_id' => $chapter->id], $userAttrs)); $restrictionService = $this->app[PermissionService::class]; $restrictionService->buildJointPermissionsForEntity($book); - return [ - 'book' => $book, - 'chapter' => $chapter, - 'page' => $page - ]; + + return compact('book', 'chapter', 'page'); } /** @@ -101,7 +105,7 @@ abstract class BrowserKitTest extends TestCase */ protected function getNewBlankUser($attributes = []) { - $user = factory(\BookStack\Auth\User::class)->create($attributes); + $user = factory(User::class)->create($attributes); return $user; } diff --git a/tests/Entity/SortTest.php b/tests/Entity/SortTest.php index bb67bfc3e..01f764b7b 100644 --- a/tests/Entity/SortTest.php +++ b/tests/Entity/SortTest.php @@ -287,7 +287,7 @@ class SortTest extends TestCase $resp = $this->actingAs($viewer)->get($page->getUrl()); $resp->assertDontSee($page->getUrl('/copy')); - $newBook->created_by = $viewer->id; + $newBook->owned_by = $viewer->id; $newBook->save(); $this->giveUserPermissions($viewer, ['page-create-own']); $this->regenEntityPermissions($newBook); diff --git a/tests/Permissions/RolesTest.php b/tests/Permissions/RolesTest.php index 9f32a9f49..3397ef429 100644 --- a/tests/Permissions/RolesTest.php +++ b/tests/Permissions/RolesTest.php @@ -289,7 +289,7 @@ class RolesTest extends BrowserKitTest { $otherShelf = Bookshelf::first(); $ownShelf = $this->newShelf(['name' => 'test-shelf', 'slug' => 'test-shelf']); - $ownShelf->forceFill(['created_by' => $this->user->id, 'updated_by' => $this->user->id])->save(); + $ownShelf->forceFill(['owned_by' => $this->user->id, 'updated_by' => $this->user->id])->save(); $this->regenEntityPermissions($ownShelf); $this->checkAccessPermission('bookshelf-update-own', [ @@ -319,7 +319,7 @@ class RolesTest extends BrowserKitTest $this->giveUserPermissions($this->user, ['bookshelf-update-all']); $otherShelf = Bookshelf::first(); $ownShelf = $this->newShelf(['name' => 'test-shelf', 'slug' => 'test-shelf']); - $ownShelf->forceFill(['created_by' => $this->user->id, 'updated_by' => $this->user->id])->save(); + $ownShelf->forceFill(['owned_by' => $this->user->id, 'updated_by' => $this->user->id])->save(); $this->regenEntityPermissions($ownShelf); $this->checkAccessPermission('bookshelf-delete-own', [ From e408067b10c97362088806b00d06e968049fd5e4 Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Wed, 30 Dec 2020 22:25:10 +0000 Subject: [PATCH 03/11] Fixed test helper method signature --- tests/BrowserKitTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/BrowserKitTest.php b/tests/BrowserKitTest.php index a6c461c44..6c332a984 100644 --- a/tests/BrowserKitTest.php +++ b/tests/BrowserKitTest.php @@ -71,7 +71,7 @@ abstract class BrowserKitTest extends TestCase /** * Create a group of entities that belong to a specific user. */ - protected function createEntityChainBelongingToUser(User $creatorUser, ?User $updaterUser): array + protected function createEntityChainBelongingToUser(User $creatorUser, ?User $updaterUser = null): array { if (empty($updaterUser)) { $updaterUser = $creatorUser; From 33e35c9a8af18e96abc54b2d5b553195c495d4df Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Thu, 31 Dec 2020 15:27:25 +0000 Subject: [PATCH 04/11] Converted breadcrumb-listing to new component system --- resources/js/components/breadcrumb-listing.js | 17 +++++++---------- .../views/form/entity-permissions.blade.php | 15 ++++++++++----- .../partials/breadcrumb-listing.blade.php | 18 ++++++++++++++---- 3 files changed, 31 insertions(+), 19 deletions(-) diff --git a/resources/js/components/breadcrumb-listing.js b/resources/js/components/breadcrumb-listing.js index 7f4344b17..3ce4bc77e 100644 --- a/resources/js/components/breadcrumb-listing.js +++ b/resources/js/components/breadcrumb-listing.js @@ -1,17 +1,14 @@ - class BreadcrumbListing { - constructor(elem) { - this.elem = elem; - this.searchInput = elem.querySelector('input'); - this.loadingElem = elem.querySelector('.loading-container'); - this.entityListElem = elem.querySelector('.breadcrumb-listing-entity-list'); + setup() { + this.elem = this.$el; + this.searchInput = this.$refs.searchInput; + this.loadingElem = this.$refs.loading; + this.entityListElem = this.$refs.entityList; - // this.loadingElem.style.display = 'none'; - const entityDescriptor = elem.getAttribute('breadcrumb-listing').split(':'); - this.entityType = entityDescriptor[0]; - this.entityId = Number(entityDescriptor[1]); + this.entityType = this.$opts.entityType; + this.entityId = Number(this.$opts.entityId); this.elem.addEventListener('show', this.onShow.bind(this)); this.searchInput.addEventListener('input', this.onSearch.bind(this)); diff --git a/resources/views/form/entity-permissions.blade.php b/resources/views/form/entity-permissions.blade.php index 3581a545b..16e105e10 100644 --- a/resources/views/form/entity-permissions.blade.php +++ b/resources/views/form/entity-permissions.blade.php @@ -4,11 +4,16 @@

{{ trans('entities.permissions_intro') }}

-
- @include('form.checkbox', [ - 'name' => 'restricted', - 'label' => trans('entities.permissions_enable'), - ]) +
+
+ @include('form.checkbox', [ + 'name' => 'restricted', + 'label' => trans('entities.permissions_enable'), + ]) +
+
+ +
diff --git a/resources/views/partials/breadcrumb-listing.blade.php b/resources/views/partials/breadcrumb-listing.blade.php index a1a33ae1c..160fa3c23 100644 --- a/resources/views/partials/breadcrumb-listing.blade.php +++ b/resources/views/partials/breadcrumb-listing.blade.php @@ -1,4 +1,7 @@ -
diff --git a/resources/views/partials/breadcrumb-listing.blade.php b/resources/views/partials/breadcrumb-listing.blade.php index 160fa3c23..2a559aa7d 100644 --- a/resources/views/partials/breadcrumb-listing.blade.php +++ b/resources/views/partials/breadcrumb-listing.blade.php @@ -1,24 +1,23 @@ -
{{ trans('common.role') }}