? ? Pending

User tests: Successful: Unsuccessful:

avatar chmst
chmst
13 Jun 2020

Pull Request for Issue #29589 .

Summary of Changes

In general, the site information has view level "super users". So in geeral, module "site information" is not shown for users of other groups.
But this view level can be changed to public or special.

If a user hast not permission to manage users, he should not see the users information.

Testing Instructions

Make sure that the admin module "site information" has view level "manage" or lower.
Login as a user in a group without the right to manage users.
You may not see the users information.

Expected result

site-information

Remark

Users and articles information are shown in many places.
I think this information could be removed from site information as well.

avatar chmst chmst - open - 13 Jun 2020
avatar chmst chmst - change - 13 Jun 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 13 Jun 2020
Category Modules Administration
avatar chmst chmst - change - 13 Jun 2020
Title
No user information if the user hast not the right to manage users
[4.0] No user information if the user hast not the right to manage users
avatar chmst chmst - edited - 13 Jun 2020
avatar particthistle particthistle - test_item - 13 Jun 2020 - Tested unsuccessfully
avatar particthistle
particthistle - comment - 13 Jun 2020

I have tested this item ? unsuccessfully on 269d0b7

Partially tested successfully.

Manager level user Success

  • Manager doesn't have User management access
  • Site Information module set to "Special"
  • Number of users on the site not shown.

Administrator level user Issue Discovered

  • Administrator has User management access
  • Site Information module set to "Special"
  • Number of users on the site not shown, but as the Administrator has User Management access, they should be able to see the number of users?

Line 108 looks to be overzealous:

if ($users && $user->authorise('core.PR an', 'com_users'))

Still working out Joomla function code... what's the 'core.PR an' permission do?


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

avatar brianteeman
brianteeman - comment - 13 Jun 2020

If a user hast not permission to manage users, he should not see the users information.

I do not agree with this assumption

I think it is perfectly valid that the site information module displays the count of users. It is only the link that needs to be removed

avatar particthistle
particthistle - comment - 13 Jun 2020

Changing it to core.manage at line 108 per @Quy suggestion resolved the issue I had with the PR test.

if ($users && $user->authorise('core.manage', 'com_users'))

@brianteeman I'm split on whether the non-user managers should be able to see the number of users.

Further to @brianteeman comment, changing 108-114 to the following would disable the link, but still display the number of users. It just doesn't format the number as it's no longer a link.

			if ($users)
			{
				$rows[$i]        = new \stdClass;
				$rows[$i]->title = Text::_('MOD_STATS_USERS');
				$rows[$i]->icon  = 'users';
				$rows[$i]->data  = $users;
				if ($user->authorise('core.manage', 'com_users'))
				    {
				    $rows[$i]->link  = Route::_('index.php?option=com_users');
				    }
				$i++;
			}

image

avatar chmst chmst - change - 13 Jun 2020
Labels Added: ?
avatar chmst
chmst - comment - 13 Jun 2020

Thank you for testing and your opinion. I have fixed and changed as you prefer to remove only the link.


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

avatar chmst
chmst - comment - 13 Jun 2020

Thank you for testing and your opinion. I have fixed and changed as you prefer to remove only the link.


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

avatar Quy Quy - test_item - 13 Jun 2020 - Tested successfully
avatar Quy
Quy - comment - 13 Jun 2020

I have tested this item successfully on ac3f59f


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

avatar particthistle particthistle - test_item - 14 Jun 2020 - Tested successfully
avatar particthistle
particthistle - comment - 14 Jun 2020

I have tested this item successfully on ac3f59f

Revised version tested as expected.


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

avatar richard67
richard67 - comment - 14 Jun 2020

Last 3 commits after @particthistle 's test have just been code style, so his test result is still valid. I'll add it back in the issue tracker so it is correctly counted.

@Quy After your test there have been changes which were not code style only. Could you test again? Thanks in advance.

avatar richard67 richard67 - alter_testresult - 14 Jun 2020 - particthistle: Tested successfully
avatar Quy Quy - test_item - 14 Jun 2020 - Tested successfully
avatar Quy
Quy - comment - 14 Jun 2020

I have tested this item successfully on 01c5665


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

avatar Quy Quy - change - 14 Jun 2020
Status Pending Ready to Commit
avatar Quy
Quy - comment - 14 Jun 2020

RTC


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

avatar richard67
richard67 - comment - 14 Jun 2020

@zero-24 GitHub still shows that there are changes requested. I think it's due to your past review, but it is solved meanwhile as far as I can see. Could you just review again so this display of requested changes disappears if all is ok?

avatar wilsonge wilsonge - close - 15 Jun 2020
avatar wilsonge wilsonge - merge - 15 Jun 2020
avatar wilsonge wilsonge - change - 15 Jun 2020
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-06-15 21:40:35
Closed_By wilsonge
Labels Added: ?
avatar wilsonge
wilsonge - comment - 15 Jun 2020

Thanks!

Add a Comment

Login with GitHub to post a comment