Skip to content

Commit

Permalink
Update code for Joomla 6
Browse files Browse the repository at this point in the history
  • Loading branch information
sonvnn committed Sep 11, 2024
1 parent b837676 commit 1ed3138
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion framework/library/astroid/Helper/Media.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public static function library()
$asset = $input->get('asset');
$author = $input->get('author');

$user = Factory::getUser();
$user = Factory::getApplication()->getIdentity();

if (!$user->authorise('core.manage', 'com_media') && (!$asset || (!$user->authorise('core.edit', $asset) && !$user->authorise('core.create', $asset) && count($user->getAuthorisedCategories($asset, 'core.create')) == 0) && !($user->id == $author && $user->authorise('core.edit.own', $asset)))) {
throw new \JAccessExceptionNotallowed(Text::_('JERROR_ALERTNOAUTHOR'), 403);
Expand Down

0 comments on commit 1ed3138

Please sign in to comment.