User tests: Successful: Unsuccessful:
This aligns the access checks for the published
state and the publish_up/down
checks to both use the given filter.published
.
Pull Request for Issue #42452.
The main CategoryModel
model has the right access checks in
joomla-cms/components/com_content/src/Model/CategoryModel.php
Lines 154 to 159 in 302ce23
Here, the access to the single category in question is checked the right way (i.e. by including the category id in the asset name).
But the category model does not filter the articles itself. For this, it calls into ArticlesModel
:
joomla-cms/components/com_content/src/Model/CategoryModel.php
Lines 233 to 238 in 302ce23
and passes on the filter.published
state.
But in ArticlesModel::getItems()
, the access check is repeated with a generic asset tag (i.e. com_content
w/o any category information), but only for the publish_up/down
case. In the simple published
case, no additional access check is performed, and just the value of filter.published
is used.
joomla-cms/components/com_content/src/Model/ArticlesModel.php
Lines 492 to 496 in 302ce23
This patch essentially aligns the access checks for the published state and the publish_up/down checks to both use the given filter.published
.
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
Status | New | ⇒ | Pending |
Category | ⇒ | Front End com_content |
Labels |
Added:
PR-4.4-dev
|
Title |
|
I have tested this item ✅ successfully on 3ed3af0
Status | Pending | ⇒ | Ready to Commit |
RTC
Labels |
Added:
RTC
|
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2024-09-12 08:00:15 |
Closed_By | ⇒ | laoneo |
Thanks!
I have tested this item ✅ successfully on 3ed3af0
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42694.