Skip to content

Commit 2eb9ecb

Browse files
authored
Merge pull request #18717 from craftcms/bugfix/18711-editing-entry-authors
Bugfix/18711 editing entry authors
2 parents 5fa875a + 6cf9153 commit 2eb9ecb

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- Fixed a bug where entries weren’t redirecting back to their section’s page’s URL by default.
66
- Fixed a bug where the `resourceBasePath` and `resourceBaseUrl` config settings weren’t being respected for console requests. ([#18685](https://github.com/craftcms/cms/issues/18685))
77
- Fixed a bug where eager-loadable GraphQL fields could be populated with the wrong field’s results, if they followed a fragment with a `*Interface` type condition. ([#18708](https://github.com/craftcms/cms/issues/18708))
8+
- Fixed a bug where users with permission to edit entries, but not view peer entries in a section, weren’t allowed to edit the authors for entries in the section. ([#18717](https://github.com/craftcms/cms/pull/18717))
89

910
## 5.9.20 - 2026-04-14
1011

src/elements/Entry.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2486,7 +2486,7 @@ protected function inlineAttributeInputHtml(string $attribute): string
24862486
],
24872487
'single' => false,
24882488
'elements' => $authors ?: null,
2489-
'disabled' => false,
2489+
'disabled' => !$this->canChangeAuthor(),
24902490
'errors' => $this->getErrors('authorIds'),
24912491
'limit' => $section->maxAuthors,
24922492
]);
@@ -2798,10 +2798,6 @@ private function canChangeAuthor(?User $user = null): bool
27982798

27992799
$section = $this->getSection();
28002800

2801-
if (!$user->can("viewPeerEntries:$section->uid")) {
2802-
return false;
2803-
}
2804-
28052801
$authorIds = $this->getAuthorIds();
28062802

28072803
return (

0 commit comments

Comments
 (0)