No Code Attached Yet bug
avatar chmst
chmst
29 May 2021

Steps to reproduce the issue

Set permission for a usergroup to denied for edit state (I did it in com_content).
Log in as a user of this group. .

Expected result

The buttons for changing the state are disabled and the tooltip has no call-to-action

Actual result

The user could think that he can change the state

grafik

avatar chmst chmst - open - 29 May 2021
avatar joomla-cms-bot joomla-cms-bot - change - 29 May 2021
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 29 May 2021
avatar brianteeman
brianteeman - comment - 30 May 2021

I took a look at this but the code is a bit beyond me. The text is created in the button so it would need a change something like this.

				if ($publishUp)
				{
					$tips[] = Text::sprintf('JLIB_HTML_PUBLISHED_START', HTMLHelper::_('date', $publishUp, Text::_('DATE_FORMAT_LC5'), 'UTC'));
					if (Factory::getUser()->authorise('core.edit.state', 'com_content'))
					{
						$tips[] = Text::_('JLIB_HTML_PUBLISHED_UNPUBLISH');
					}
				}

However the if condition is not completely correct as it would need to have something generic instead of com_content as the button is used in other components.

(Oh an the same thing will be needed for the featured button

avatar chmst chmst - change - 20 Feb 2023
Labels Added: No Code Attached Yet bug
Removed: ?
avatar chmst chmst - labeled - 20 Feb 2023

Add a Comment

Login with GitHub to post a comment