Commit 69c3b060 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

feat(plugins) Huge plInfo cleanup and adaptation

objectClasses are now statically defined in plInfo.
Also removed useless $mainTab and plSelfModify occurences

issue #5826
parent 1711370a
......@@ -20,19 +20,14 @@
class mailAliasDistribution extends simplePlugin
{
var $mainTab = TRUE;
var $objectclasses = array('top', 'mailAliasDistribution');
/* Return plugin information for acl handling */
public static function plInfo()
{
return array(
'plShortName' => _('Temporary mail distribution'),
'plDescription' => _('Temporary mail distribution'),
'plObjectClass' => array('mailAliasDistribution'),
'plObjectType' => array('mailAliasDistribution' => array(
'name' => _('Temporary mail distribution'),
'filter' => 'objectClass=mailAliasDistribution',
'aclCategory' => 'alias',
'icon' => 'geticon.php?context=applications&icon=alias-distribution&size=16',
'ou' => get_ou('aliasRDN'),
......
......@@ -20,19 +20,14 @@
class mailAliasRedirection extends simplePlugin
{
var $mainTab = TRUE;
var $objectclasses = array('top', 'mailAliasRedirection');
/* Return plugin information for acl handling */
public static function plInfo()
{
return array(
'plShortName' => _('Temporary mail redirection'),
'plDescription' => _('Temporary mail redirection'),
'plObjectClass' => array('mailAliasRedirection'),
'plObjectType' => array('mailAliasRedirection' => array(
'name' => _('Temporary mail redirection'),
'filter' => 'objectClass=mailAliasRedirection',
'aclCategory' => 'alias',
'icon' => 'geticon.php?context=applications&icon=alias-redirection&size=16',
'ou' => get_ou('aliasRDN'),
......
......@@ -20,17 +20,16 @@
class aliasConfig extends simplePlugin
{
var $objectclasses = array("fdAliasPluginConf");
static function plInfo()
{
return array(
"plShortName" => _("Alias configuration"),
"plDescription" => _("FusionDirectory alias plugin configuration"),
"plCategory" => array("configuration"),
"plObjectType" => array("smallConfig"),
'plShortName' => _('Alias configuration'),
'plDescription' => _('FusionDirectory alias plugin configuration'),
'plObjectClass' => array('fdAliasPluginConf'),
'plCategory' => array('configuration'),
'plObjectType' => array('smallConfig'),
"plProvidedAcls" => parent::generatePlProvidedAcls(static::getAttributesInfo())
'plProvidedAcls' => parent::generatePlProvidedAcls(static::getAttributesInfo())
);
}
......
......@@ -21,16 +21,14 @@
class application extends simplePlugin
{
var $objectclasses = array('fdDesktopApplication');
static function plInfo()
{
return array(
'plShortName' => _('Application'),
'plDescription' => _('Application information'),
'plObjectClass' => array('fdDesktopApplication'),
'plObjectType' => array('application' => array(
'name' => _('Application'),
'filter' => 'objectClass=fdDesktopApplication',
'ou' => get_ou('applicationsRDN'),
'icon' => 'geticon.php?context=mimetypes&icon=application-x-executable&size=16',
)),
......
......@@ -20,16 +20,14 @@
class webApplication extends simplePlugin
{
var $objectclasses = array('fdWebApplication');
public static function plInfo()
{
return array(
'plShortName' => _('Web application'),
'plDescription' => _('Web applicationts names, icons and links'),
'plObjectClass' => array('fdWebApplication'),
'plObjectType' => array('webApplication' => array(
'name' => _('Web application'),
'filter' => 'objectClass=fdWebApplication',
'ou' => get_ou('webappsRDN'),
'icon' => 'geticon.php?context=categories&icon=applications-internet&size=16'
)),
......
......@@ -20,8 +20,6 @@
class applicationRights extends simplePlugin
{
var $objectclasses = array('fdApplicationRights');
var $displayHeader = TRUE;
static function plInfo()
......@@ -29,8 +27,8 @@ class applicationRights extends simplePlugin
return array(
'plShortName' => _('Applications'),
'plDescription' => _('Applications allowed for this role'),
'plFilter' => '(objectClass=fdApplicationRights)',
'plSmallIcon' => 'geticon.php?context=mimetypes&icon=application-x-executable&size=16',
'plObjectClass' => array('fdApplicationRights'),
'plObjectType' => array('role'),
'plForeignKeys' => array(
'fdApplicationAllowed' => 'webApplication',
......
......@@ -20,13 +20,13 @@
class applicationsPluginConfig extends simplePlugin
{
var $objectclasses = array('fdApplicationsPluginConf');
static function plInfo()
{
return array(
'plShortName' => _('Applications'),
'plDescription' => _('Applications plugin configuration'),
'plObjectClass' => array('fdApplicationsPluginConf'),
'plCategory' => array('configuration'),
'plObjectType' => array('smallConfig'),
'plProvidedAcls' => parent::generatePlProvidedAcls(static::getAttributesInfo())
......
......@@ -116,7 +116,6 @@ class ArgonautServiceNameAttribute extends CompositeAttribute
class argonautClient extends simplePlugin
{
var $objectclasses = array('argonautClient');
var $displayHeader = TRUE;
var $inheritance = array('gosaGroupOfNames' => 'member');
......@@ -126,6 +125,7 @@ class argonautClient extends simplePlugin
return array(
'plShortName' => _('Argonaut client'),
'plDescription' => _('Edit argonaut client settings'),
'plObjectClass' => array('argonautClient'),
'plObjectType' => array('workstation','server','terminal','ogroup-dynamic'),
'plProvidedAcls' => parent::generatePlProvidedAcls(static::getAttributesInfo())
......
......@@ -20,7 +20,6 @@
class deploymentTimeframe extends simplePlugin
{
var $objectclasses = array('argonautDeploymentOptions');
var $displayHeader = TRUE;
var $inheritance = array('gosaGroupOfNames' => 'member');
......@@ -30,6 +29,7 @@ class deploymentTimeframe extends simplePlugin
return array(
'plShortName' => _('Deployment time frame'),
'plDescription' => _('Edit deployment time frame'),
'plObjectClass' => array('argonautDeploymentOptions'),
'plObjectType' => array('workstation','server','terminal','ogroup-dynamic'),
'plProvidedAcls' => parent::generatePlProvidedAcls(static::getAttributesInfo())
......
......@@ -22,8 +22,6 @@ class argonautDNSConfig extends simpleService
{
protected static $showActions = FALSE;
var $objectclasses = array('argonautDNSConfig');
/* Return plugin information for acl handling */
static function plInfo()
{
......@@ -31,6 +29,7 @@ class argonautDNSConfig extends simpleService
'plShortName' => _('Argonaut DNS settings'),
'plDescription' => _('Argonaut DNS settings').' ('._('Services').')',
'plIcon' => 'geticon.php?context=applications&icon=argonaut-dns&size=16',
'plObjectClass' => array('argonautDNSConfig'),
'plProvidedAcls' => parent::generatePlProvidedAcls(static::getAttributesInfo())
);
......
......@@ -21,15 +21,13 @@
class argonautFuseConfig extends simpleService
{
var $objectclasses = array('argonautFuseConfig');
/* Return plugin information for acl handling */
static function plInfo()
{
return array(
'plShortName' => _('Argonaut Fuse'),
'plDescription' => _('Argonaut Fuse settings'),
'plIcon' => 'geticon.php?context=applications&icon=argonaut-fuse&size=16',
'plObjectClass' => array('argonautFuseConfig'),
'plProvidedAcls' => parent::generatePlProvidedAcls(static::getAttributesInfo())
);
......
......@@ -21,19 +21,18 @@
class argonautFuseFAIConfig extends simplePlugin
{
var $objectclasses = array("argonautFuseFAIConfig");
var $showActions = FALSE;
var $displayHeader = TRUE;
var $displayHeader = TRUE;
/* Return plugin information for acl handling */
static function plInfo()
{
return array(
"plShortName" => _("Argonaut Fuse FAI module settings"),
"plDescription" => _("Argonaut Fuse FAI module settings")." ("._("Services").")",
"plCategory" => array("server"),
"plObjectType" => array("fusemodule"),
"plProvidedAcls" => parent::generatePlProvidedAcls(static::getAttributesInfo())
'plShortName' => _('Argonaut Fuse FAI module settings'),
'plDescription' => _('Argonaut Fuse FAI module settings').' ('._('Services').')',
'plCategory' => array('server'),
'plObjectClass' => array('argonautFuseFAIConfig'),
'plObjectType' => array('fusemodule'),
'plProvidedAcls' => parent::generatePlProvidedAcls(static::getAttributesInfo())
);
}
......
......@@ -21,7 +21,6 @@
class argonautFuseLTSPConfig extends simplePlugin
{
var $objectclasses = array('argonautFuseLTSPConfig');
var $showActions = FALSE;
var $displayHeader = TRUE;
......@@ -32,6 +31,7 @@ class argonautFuseLTSPConfig extends simplePlugin
'plShortName' => _('Argonaut Fuse LTSP module settings'),
'plDescription' => _('Argonaut Fuse LTSP module settings').' ('._('Services').')',
'plCategory' => array('server'),
'plObjectClass' => array('argonautFuseLTSPConfig'),
'plObjectType' => array('fusemodule'),
'plProvidedAcls' => parent::generatePlProvidedAcls(static::getAttributesInfo())
);
......
......@@ -21,19 +21,18 @@
class argonautFuseOPSIConfig extends simplePlugin
{
var $objectclasses = array("argonautFuseOPSIConfig");
var $showActions = FALSE;
var $displayHeader = TRUE;
var $displayHeader = TRUE;
/* Return plugin information for acl handling */
static function plInfo()
{
return array(
"plShortName" => _("Argonaut Fuse OPSI module settings"),
"plDescription" => _("Argonaut Fuse OPSI module settings")." ("._("Services").")",
"plCategory" => array("server"),
"plObjectType" => array("fusemodule"),
"plProvidedAcls" => parent::generatePlProvidedAcls(static::getAttributesInfo())
'plShortName' => _('Argonaut Fuse OPSI module settings'),
'plDescription' => _('Argonaut Fuse OPSI module settings').' ('._('Services').')',
'plCategory' => array('server'),
'plObjectClass' => array('argonautFuseOPSIConfig'),
'plObjectType' => array('fusemodule'),
'plProvidedAcls' => parent::generatePlProvidedAcls(static::getAttributesInfo())
);
}
......
......@@ -22,14 +22,13 @@ class argonautMirrorConfig extends simpleService
{
protected static $showActions = FALSE;
var $objectclasses = array('argonautMirrorConfig');
static function plInfo()
{
return array(
'plShortName' => _('Argonaut Mirror settings'),
'plDescription' => _('Argonaut Mirror settings'),
'plIcon' => 'geticon.php?context=applications&icon=argonaut-mirror&size=16',
'plObjectClass' => array('argonautMirrorConfig'),
'plProvidedAcls' => parent::generatePlProvidedAcls(static::getAttributesInfo())
);
......
......@@ -21,10 +21,6 @@
class argonautServer extends simpleService
{
/* This plugin only writes its objectClass */
var $objectclasses = array("argonautServer");
/* Return plugin information for acl handling */
static function plInfo()
{
$acls = parent::generatePlProvidedAcls(static::getAttributesInfo());
......@@ -35,12 +31,13 @@ class argonautServer extends simpleService
'plShortName' => _('Argonaut server'),
'plDescription' => _('Argonaut server').' ('._('Services').')',
'plIcon' => 'geticon.php?context=applications&icon=argonaut&size=16',
'plObjectClass' => array('argonautServer'),
'plProvidedAcls' => $acls,
);
}
/*!
/*!
* \brief The main function : information about attributes
*/
static function getAttributesInfo ()
......
......@@ -49,16 +49,14 @@ class auditEvent extends simplePlugin
{
public $base;
var $objectclasses = array('fdAuditEvent');
public static function plInfo()
{
return array(
'plShortName' => _('Audit event'),
'plDescription' => _('An event like ldap modification which was registered by audit plugin'),
'plObjectClass' => array('fdAuditEvent'),
'plObjectType' => array('auditEvent' => array(
'name' => _('Audit event'),
'filter' => 'objectClass=fdAuditEvent',
'icon' => 'geticon.php?context=applications&icon=audit&size=16',
'ou' => get_ou('auditRDN'),
'mainAttr' => FALSE,
......
......@@ -20,13 +20,12 @@
class auditConfig extends simplePlugin
{
var $objectclasses = array('fdAuditPluginConf');
static function plInfo()
{
return array(
'plShortName' => _('Audit configuration'),
'plDescription' => _('FusionDirectory audit plugin configuration'),
'plObjectClass' => array('fdAuditPluginConf'),
'plCategory' => array('configuration'),
'plObjectType' => array('smallConfig'),
......
......@@ -20,19 +20,14 @@
class nisMap extends simplePlugin
{
var $mainTab = TRUE;
var $objectclasses = array('nisMap', 'top');
/* Return plugin information for acl handling */
static function plInfo()
{
return array(
'plShortName' => _('Mount point'),
'plDescription' => _('Autofs mount point'),
'plObjectClass' => array('nisMap'),
'plObjectType' => array('nisMap' => array(
'name' => _('Mount point'),
'filter' => 'objectClass=nisMap',
'ou' => get_ou('autofsRDN'),
'icon' => 'geticon.php?context=applications&icon=autofs-nis-netmap&size=16',
'mainAttr' => 'nisMapName',
......
......@@ -20,19 +20,14 @@
class nisObject extends simplePlugin
{
var $mainTab = TRUE;
var $objectclasses = array('nisObject');
/* Return plugin information for acl handling */
static function plInfo()
{
return array(
'plShortName' => _('Directory'),
'plDescription' => _('Directory'),
'plObjectClass' => array('nisObject'),
'plObjectType' => array('nisObject' => array(
'name' => _('Directory'),
'filter' => 'objectClass=nisObject',
'ou' => get_ou('autofsRDN'),
'icon' => 'geticon.php?context=applications&icon=autofs-nis-object&size=16',
'mainAttr' => 'cn',
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment