PATCH: wikiplugin_userlist.php handles privileges the opposite way
- Status
- Closed
- Subject
- PATCH: wikiplugin_userlist.php handles privileges the opposite way
- Version
- 10.x
8.x
9.x - Category
- Error
- Less than 30-minutes fix
- Patch
- Feature
- Wiki Plugin (extends basic syntax)
- Resolution status
- Fixed or Solved
- Submitted by
- josefg
- Volunteered to solve
- Pascal St-Jean
- Lastmod by
- josefg
- Rating
- Description
When using the UserList plugin, the links on the user names leading to their personal information pages, are shown and hidden depending on privileges of the logged in user. Unfortunately, the logic is reverse of what it should be.
Correct logic is: show links for all users that when either A.) You have admin privileges. B.) User listed is yourself. C.) User listed has chosen to make his profile information public.
Current logic is: show links when A.) You have admin privileges. B.) User listed is NOT yourself, AND user listed has chosen NOT to make his information public.
- Solution
in the file /lib/wiki-plugins/wikiplugin_userlist.php, change the line 153 from:
wikiplugin_userlist.php line 153 (BUG)Copy to clipboardif ($user_information == 'private' && $row['login'] != $user) {
towikiplugin_userlist.php line 153 (FIX)Copy to clipboardif (!($user_information == 'private' && $row['login'] != $user)) {
and the trick should be done.
While you're at it, the sister file /lib/wiki-plugins/wikiplugin_realnamelist.php can be fixed as well.Change line 153 from
wikiplugin_realnamelist.php line 153 (BUG)Copy to clipboardif (isset($user) && $user_information == 'private' && $row['login'] != $user) {
towikiplugin_realnamelist.php line 153 (FIX)Copy to clipboardif (isset($user) && ($user_information != 'private' || $row['login'] == $user)) {- Importance
- 5
- Easy to solve?
- 10 easy
- Priority
- 50
- Demonstrate Bug on Tiki 19+
-
This bug has been demonstrated on show2.tiki.org
Please demonstrate your bug on show2.tiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show2.tiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Demonstrate Bug (older Tiki versions)
-
This bug has been demonstrated on show.tikiwiki.org
Please demonstrate your bug on show.tikiwiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show.tikiwiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Ticket ID
- 4190
- Created
- Tuesday 03 April, 2012 10:37:58 UTC
by josefg - LastModif
- Friday 13 April, 2012 20:27:57 UTC