Skip to content

Commit add0913

Browse files
committed
Perms: Removed entity perm regen on general update
Should not be needed here as this is not directly used for information which should impact permissions. Been through uses to ensure that this is the case.
1 parent 3d01759 commit add0913

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

app/Entities/Repos/BaseRepo.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ public function update(Entity $entity, array $input)
7777
$entity->touch();
7878
}
7979

80-
$entity->rebuildPermissions();
8180
$entity->indexForSearch();
8281
$this->referenceStore->updateForEntity($entity);
8382

@@ -139,7 +138,7 @@ public function updateDefaultTemplate(Book|Chapter $entity, int $templateId): vo
139138

140139
/**
141140
* Sort the parent of the given entity, if any auto sort actions are set for it.
142-
* Typical ran during create/update/insert events.
141+
* Typically ran during create/update/insert events.
143142
*/
144143
public function sortParent(Entity $entity): void
145144
{

app/Entities/Repos/PageRepo.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ public function publishDraft(Page $draft, array $input): Page
7777
$draft->priority = $this->getNewPriority($draft);
7878
$this->updateTemplateStatusAndContentFromInput($draft, $input);
7979
$this->baseRepo->update($draft, $input);
80+
$draft->rebuildPermissions();
8081

8182
$summary = trim($input['summary'] ?? '') ?: trans('entities.pages_initial_revision');
8283
$this->revisionRepo->storeNewForPage($draft, $summary);
@@ -91,7 +92,7 @@ public function publishDraft(Page $draft, array $input): Page
9192
/**
9293
* Directly update the content for the given page from the provided input.
9394
* Used for direct content access in a way that performs required changes
94-
* (Search index & reference regen) without performing an official update.
95+
* (Search index and reference regen) without performing an official update.
9596
*/
9697
public function setContentFromInput(Page $page, array $input): void
9798
{

app/Sorting/BookSorter.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace BookStack\Sorting;
44

5-
use BookStack\App\Model;
65
use BookStack\Entities\Models\Book;
76
use BookStack\Entities\Models\BookChild;
87
use BookStack\Entities\Models\Chapter;

0 commit comments

Comments
 (0)