33
2
mirror of https://github.com/joomla-extensions/jedchecker.git synced 2024-11-11 07:41:04 +00:00

Merge pull request #25 from JazParkyn/master

Add ACL
This commit is contained in:
Jaz Parkyn 2016-02-21 22:17:41 +00:00
commit bd9be22507
4 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<access component="com_jedchecker">
<section name="component">
<action name="core.admin" title="JACTION_ADMIN" description="JACTION_ADMIN_COMPONENT_DESC" />
<action name="core.manage" title="JACTION_MANAGE" description="JACTION_MANAGE_COMPONENT_DESC" />
</section>
</access>

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<config>
<fieldset
name="permissions"
label="JCONFIG_PERMISSIONS_LABEL"
description="JCONFIG_PERMISSIONS_DESC"
>
<field
name="rules"
type="rules"
label="JCONFIG_PERMISSIONS_LABEL"
class="inputbox"
validate="rules"
filter="rules"
component="com_jedchecker"
section="component"
/>
</fieldset>
</config>

View File

@ -10,6 +10,11 @@
defined('_JEXEC') or die('Restricted access');
jimport('joomla.application.component.controllerlegacy');
if (!JFactory::getUser()->authorise('core.manage', 'com_jedchecker'))
{
throw new Exception(JText::_('JERROR_ALERTNOAUTHOR'));
}
// We'll need jfile and JFolder all through the compoenent so let us load them here
jimport('joomla.filesystem.folder');
jimport('joomla.filesystem.file');

View File

@ -70,6 +70,11 @@ class JedcheckerViewUploads extends JViewLegacy
}
JToolBarHelper::title('JED checker');
if (JFactory::getUser()->authorise('core.admin', 'com_jedchecker'))
{
JToolBarHelper::preferences('com_jedchecker');
}
}
/**