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

:sparkles: feat(argonaut): Add deployment tab to store time frames

This adds a Deployment tab containing the authorized time frames

issue #5700
Showing with 88 additions and 0 deletions
+88 -0
<?php
/*
This code is part of FusionDirectory (http://www.fusiondirectory.org/)
Copyright (C) 2017 FusionDirectory
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
*/
class deploymentTimeframe extends simplePlugin
{
var $objectclasses = array('argonautDeploymentOptions');
var $displayHeader = TRUE;
var $inheritance = array('gosaGroupOfNames' => 'member');
static function plInfo ()
{
return array(
'plShortName' => _('Deployment time frame'),
'plDescription' => _('Edit deployment time frame'),
'plObjectType' => array('workstation','server','terminal','ogroup-dynamic'),
'plProvidedAcls' => parent::generatePlProvidedAcls(static::getAttributesInfo())
);
}
// The main function : information about attributes
static function getAttributesInfo ()
{
return array(
'main' => array(
'name' => _('Time frames'),
'attrs' => array(
new OrderedArrayAttribute(
new CharSeparatedCompositeAttribute(
_('Time frames in which deployment is authorized'),
'argonautDeploymentTimeframe',
array(
new StringAttribute (
_('Begin'), _('Opening time for this frame as HH:MM'),
'begin', TRUE,
'', '',
'/^\d\d:\d\d$/',
'10:00'
),
new StringAttribute (
_('End'), _('Closing time for this frame as HH:MM'),
'end', TRUE,
'', '',
'/^\d\d:\d\d$/',
'11:00'
)
),
'-',
'',
_('Time frames')
),
FALSE, array(), TRUE
)
)
),
);
}
}
?>
...@@ -357,6 +357,11 @@ attributetype ( 1.3.6.1.4.1.38414.2.15.4 NAME 'argonautFAIMonitorLogDir' ...@@ -357,6 +357,11 @@ attributetype ( 1.3.6.1.4.1.38414.2.15.4 NAME 'argonautFAIMonitorLogDir'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SYNTAX 1.3.6.1.4.1.1466.115.121.1.26
SINGLE-VALUE ) SINGLE-VALUE )
attributetype ( 1.3.6.1.4.1.38414.2.16.1 NAME 'argonautDeploymentTimeframe'
DESC 'Fusion Directory - Argonaut, deployment time frame.'
EQUALITY caseExactIA5Match
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
# Object Class # Object Class
objectclass ( 1.3.6.1.4.1.38414.2.2.1 NAME 'argonautServer' objectclass ( 1.3.6.1.4.1.38414.2.2.1 NAME 'argonautServer'
DESC 'An argonaut server' DESC 'An argonaut server'
...@@ -426,3 +431,8 @@ objectclass ( 1.3.6.1.4.1.38414.2.2.9 NAME 'argonautFAIMonitorConfig' ...@@ -426,3 +431,8 @@ objectclass ( 1.3.6.1.4.1.38414.2.2.9 NAME 'argonautFAIMonitorConfig'
SUP top AUXILIARY SUP top AUXILIARY
MUST ( argonautFAIMonitorPort $ argonautFAIMonitorTimeout $ MUST ( argonautFAIMonitorPort $ argonautFAIMonitorTimeout $
argonautFAIMonitorCaCertPath $ argonautFAIMonitorLogDir ) ) argonautFAIMonitorCaCertPath $ argonautFAIMonitorLogDir ) )
objectclass ( 1.3.6.1.4.1.38414.2.2.10 NAME 'argonautDeploymentOptions'
DESC 'Deployment generic options'
SUP top AUXILIARY
MUST ( argonautDeploymentTimeframe ) )
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