[5.4] check ACL when display link to user edit form#46805
[5.4] check ACL when display link to user edit form#46805heelc29 wants to merge 6 commits intojoomla:5.4-devfrom
Conversation
|
I have tested this item ✅ successfully on 67d7f2b This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46805. |
|
I have tested this item ✅ successfully on 67d7f2b This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46805. |
1 similar comment
|
I have tested this item ✅ successfully on 67d7f2b This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46805. |
|
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46805. |
|
❌ Final test before merge with JBT
|
|
@heelc29 Thank you for your contribution. In final testing I found with user component permissions edit enables, the user's own entry is no longer linked. Before the PR, the user's own entry was linked and opening the user entry worked in Articles and Contacts. Could you please check? |
Yes, you're right. There's an exception for this in the com_user dispatcher. I will update the check. |
| <td class="small d-none"> | ||
| <?php if (!empty($item->linked_user)) : ?> | ||
| <a href="<?php echo Route::_('index.php?option=com_users&task=user.edit&id=' . $item->user_id); ?>"><?php echo $item->linked_user; ?></a> | ||
| <?php if ($user->id === $item->user_id || ($user->authorise('core.manage', 'com_users') && $user->authorise('core.edit', 'com_users'))) : ?> |
There was a problem hiding this comment.
I remember that although the field has int data type, the data returns from database for the field could be int or string, depends on database system. So to be safe, I think you should use == instead of === operator here.
|
Back to pending as changes have been requested. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46805. |
Pull Request for Issue from @chmst #pbf26
Summary of Changes
Checks the ACL (Access Control List) to decide whether to display a link or just the name.
Testing Instructions
ManagergroupAccess Administration Interfaceand deny:EditActual result BEFORE applying this Pull Request
1st try

2nd try

Expected result AFTER applying this Pull Request
name of user is only displayed - no link anymore


Link to documentations
Please select: