Add an exception when not allowed (#262)

This commit is contained in:
andrepereiradasilva 2017-02-13 16:05:26 +00:00 committed by Yves Hoppe
parent d4cdc056bb
commit 5178381b51
1 changed files with 1 additions and 1 deletions

View File

@ -12,7 +12,7 @@ JHtml::_('behavior.tabstate');
if (!JFactory::getUser()->authorise('core.manage', 'com_weblinks')) 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'); $controller = JControllerLegacy::getInstance('Weblinks');