Skip to content

[J4] "Articles - Latest" admin module does not respect "edit own" permissions #36558

@crystalenka

Description

@crystalenka

Steps to reproduce the issue

  1. Create a user group "Test User Group".
  2. Create a user "Test User" and assign to "Test User Group".
  3. As a super user, navigate to the global configuration, and click permissions.
  4. Click "test user group" and ensure it can log in to administrator. Save.
  5. In the configuration, click on Articles, and click permissions.
  6. Select "Test User Group" and set "Access Administration Interface" and "Edit Own" to "Allowed", and ensure all other permissions are set to "Not Allowed", like so:

Screen Shot 2022-01-04 at 12 32 21

  1. Save.
  2. Go to content > administrator modules, and create a new module with type "Articles - Latest". Assign it to cpanel, set category to "any category", and set authors to "added or modified by me", like so:

Screen Shot 2022-01-04 at 12 34 22

  1. Save and close.
  2. Log in as Test User.
  3. Create a new article in any category and save it.
  4. Navigate to the home dashboard.

Expected result

The article is shown with a linked title so that the user can edit their own article:
Screen Shot 2022-01-04 at 12 36 40

Actual result

The title is not linked even though the user has permission to edit their own article:
Screen Shot 2022-01-04 at 12 37 38

System information (as much as possible)

Joomla 4.0.5
PHP 8

Additional comments

The title is only linked if the user group is given edit access to all articles:
Screen Shot 2022-01-04 at 12 38 40

The module helper seems to be trying to check the user permissions against the article ID, so something here must not be working right:

if ($user->authorise('core.edit', 'com_content.article.' . $item->id))
			{
				$item->link = Route::_('index.php?option=com_content&task=article.edit&id=' . $item->id);
			}

(administrator/modules/mod_latest/src/Helper/LatestHelper.php lines 99-102)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions