From 5178381b513ffa9fdb09976dc8b730762f8ed260 Mon Sep 17 00:00:00 2001 From: andrepereiradasilva Date: Mon, 13 Feb 2017 16:05:26 +0000 Subject: [PATCH] Add an exception when not allowed (#262) --- src/administrator/components/com_weblinks/weblinks.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/administrator/components/com_weblinks/weblinks.php b/src/administrator/components/com_weblinks/weblinks.php index a11fb6f..9de88b5 100644 --- a/src/administrator/components/com_weblinks/weblinks.php +++ b/src/administrator/components/com_weblinks/weblinks.php @@ -12,7 +12,7 @@ JHtml::_('behavior.tabstate'); if (!JFactory::getUser()->authorise('core.manage', 'com_weblinks')) { - return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR')); + throw new JAccessExceptionNotallowed(JText::_('JERROR_ALERTNOAUTHOR'), 403); } $controller = JControllerLegacy::getInstance('Weblinks');