? ? Pending

User tests: Successful: Unsuccessful:

avatar PhilETaylor
PhilETaylor
29 Apr 2021

Summary of Changes

Another bug found while developing Empty States :) One a security bug.

These bugs are in Languages, Newsfeeds, Tags and Notes.

The bug is that the code below makes no sense. What its TRYING to do is only show the Trash button (in the Actions dropdown menu) when the filter for the published dropdown is NOT trashed.

But what it ACTUALLY is doing (by mistake) is making it IMPOSSIBLE to Trash items IF you have a filter set (Select Published from the Status filter for example)

if (!$this->state->get('filter.published') == -2)

An example test case showing the difference in the code is here https://3v4l.org/XTPkK

That is resolved in this PR

Testing Instructions

  • Login to Joomla 4 Admin
  • Navigate to Components Tags
  • Create a Tag and set it published
  • Select the tag from the list of tags
  • Click Actions - NOTE THERE IS A TRASH BUTTON (Dont click it)
  • Click Filter Options
  • Select PUBLISHED in the STATUS dropdown filter
  • Select the tag from the list of tags
  • Click Actions - NOTE THERE IS A NOT TRASH BUTTON (This is the bug, you should be able to trash this tag here)
  • Apply PR
  • Click Actions - NOTE THERE IS NOW A TRASH BUTTON (This is the fixed bug)

Actual result BEFORE applying this Pull Request

Component Trash Button Bug
Languages Has Trash Button Bug
Newsfeeds Has Trash Button Bug
Tags Has Trash Button Bug
User Notes Has Trash Button Bug

Expected result AFTER applying this Pull Request

Component Trash Button Bug
ALL * No Trash Button Bug

Documentation Changes Required

None

avatar PhilETaylor PhilETaylor - open - 29 Apr 2021
avatar PhilETaylor PhilETaylor - change - 29 Apr 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 29 Apr 2021
Category Administration com_banners com_contact com_languages com_newsfeeds com_tags com_users
avatar PhilETaylor PhilETaylor - change - 29 Apr 2021
The description was changed
avatar PhilETaylor PhilETaylor - edited - 29 Apr 2021
avatar PhilETaylor PhilETaylor - change - 29 Apr 2021
The description was changed
avatar PhilETaylor PhilETaylor - edited - 29 Apr 2021
avatar PhilETaylor PhilETaylor - change - 29 Apr 2021
The description was changed
avatar PhilETaylor PhilETaylor - edited - 29 Apr 2021
avatar PhilETaylor PhilETaylor - change - 29 Apr 2021
The description was changed
avatar PhilETaylor PhilETaylor - edited - 29 Apr 2021
avatar PhilETaylor PhilETaylor - change - 29 Apr 2021
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 29 Apr 2021
Category Administration com_banners com_contact com_languages com_newsfeeds com_tags com_users Administration com_contact com_languages com_newsfeeds com_tags com_users
avatar joomla-cms-bot joomla-cms-bot - change - 29 Apr 2021
Category Administration com_contact com_languages com_newsfeeds com_tags com_users Administration com_languages com_newsfeeds com_tags com_users
avatar PhilETaylor PhilETaylor - change - 29 Apr 2021
The description was changed
avatar PhilETaylor PhilETaylor - edited - 29 Apr 2021
avatar PhilETaylor PhilETaylor - change - 29 Apr 2021
Title
[4][Security] Fix trash menu items ACL checks and displaying logic
[4] Fix trash menu items displaying logic
avatar PhilETaylor PhilETaylor - edited - 29 Apr 2021
avatar PhilETaylor PhilETaylor - change - 29 Apr 2021
The description was changed
avatar PhilETaylor PhilETaylor - edited - 29 Apr 2021
avatar PhilETaylor PhilETaylor - change - 29 Apr 2021
The description was changed
avatar PhilETaylor PhilETaylor - edited - 29 Apr 2021
avatar PhilETaylor
PhilETaylor - comment - 29 Apr 2021

updated code and description of the PR

avatar Quy Quy - test_item - 29 Apr 2021 - Tested successfully
avatar Quy
Quy - comment - 29 Apr 2021

I have tested this item successfully on b37e3c4


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/33406.

avatar sandramay0905 sandramay0905 - test_item - 30 Apr 2021 - Tested successfully
avatar sandramay0905
sandramay0905 - comment - 30 Apr 2021

I have tested this item successfully on b37e3c4


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/33406.

avatar alikon alikon - change - 30 Apr 2021
Status Pending Ready to Commit
avatar alikon
alikon - comment - 30 Apr 2021

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/33406.

avatar richard67 richard67 - change - 30 Apr 2021
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2021-04-30 10:10:22
Closed_By richard67
Labels Added: ?
avatar richard67 richard67 - close - 30 Apr 2021
avatar richard67 richard67 - merge - 30 Apr 2021
avatar richard67
richard67 - comment - 30 Apr 2021

Thanks!

Add a Comment

Login with GitHub to post a comment