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

Merge branch '6043-add-supannparraindn-attribute-in-the-supann-plugin' into '1.4-dev'

Resolve "add supannParrainDN attribute in the supann plugin"

See merge request fusiondirectory/fd-plugins!698
parents 596e714a 8be5d248
...@@ -42,8 +42,8 @@ class dhcpService extends dhcpPlugin ...@@ -42,8 +42,8 @@ class dhcpService extends dhcpPlugin
'ddns-update-style none' 'ddns-update-style none'
] ]
); );
$attributesInfo['main']['attrs'][] = new ObjectSelectAttribute(_('DHCP Primary'), _('Primary DHCP server'), 'dhcpPrimaryDN', FALSE, 'server'); $attributesInfo['main']['attrs'][] = new ObjectSelectAttribute(_('DHCP Primary'), _('Primary DHCP server'), 'dhcpPrimaryDN', FALSE, ['server']);
$attributesInfo['main']['attrs'][] = new ObjectSelectAttribute(_('DHCP Secondary'), _('Secondary DHCP server'), 'dhcpSecondaryDN', FALSE, 'server'); $attributesInfo['main']['attrs'][] = new ObjectSelectAttribute(_('DHCP Secondary'), _('Secondary DHCP server'), 'dhcpSecondaryDN', FALSE, ['server']);
return $attributesInfo; return $attributesInfo;
} }
} }
...@@ -54,9 +54,10 @@ class networkInterface extends simplePlugin ...@@ -54,9 +54,10 @@ class networkInterface extends simplePlugin
_('Mac address'), _('Mac address of this system'), _('Mac address'), _('Mac address of this system'),
'macAddress', FALSE 'macAddress', FALSE
), ),
new SelectAttribute( new ObjectSelectAttribute(
_('VLAN'), _('VLAN'), _('VLAN'), _('VLAN'),
'fdNetworkInterfaceVlanId', FALSE 'fdNetworkInterfaceVlanId', FALSE,
['ipamVlan'], 'fdIpamVlanInnerId'
), ),
new StringAttribute( new StringAttribute(
_('VLAN tag'), _('VLAN tag'), _('VLAN tag'), _('VLAN tag'),
...@@ -65,7 +66,7 @@ class networkInterface extends simplePlugin ...@@ -65,7 +66,7 @@ class networkInterface extends simplePlugin
new ObjectSelectAttribute( new ObjectSelectAttribute(
_('Subnet'), _('Subnet'), _('Subnet'), _('Subnet'),
'fdNetworkInterfaceSubnetDN', FALSE, 'fdNetworkInterfaceSubnetDN', FALSE,
'ipamSubnet' ['ipamSubnet']
), ),
new SetAttribute( new SetAttribute(
new IPAttribute( new IPAttribute(
...@@ -83,8 +84,5 @@ class networkInterface extends simplePlugin ...@@ -83,8 +84,5 @@ class networkInterface extends simplePlugin
global $config; global $config;
parent::__construct($dn, $object, $parent, $mainTab); parent::__construct($dn, $object, $parent, $mainTab);
$vlans = objects::ls('ipamVlan', ['fdIpamVlanInnerId' => 1,'cn' => 1]);
$this->attributesAccess['fdNetworkInterfaceVlanId']->setChoices(array_column($vlans, 'fdIpamVlanInnerId'), array_column($vlans, 'cn'));
} }
} }
...@@ -212,6 +212,11 @@ class supannAccount extends simplePlugin ...@@ -212,6 +212,11 @@ class supannAccount extends simplePlugin
'supannEtablissement', FALSE 'supannEtablissement', FALSE
) )
), ),
new ObjectsAttribute(
_('Parrain'), _('supannParrainDN - Person or structure responsible for this user'),
'supannParrainDN', FALSE,
['user','entite','ogroup','group']
)
] ]
], ],
'student' => [ 'student' => [
......
...@@ -21,9 +21,9 @@ ...@@ -21,9 +21,9 @@
class ImportServerAttribute extends ObjectSelectAttribute class ImportServerAttribute extends ObjectSelectAttribute
{ {
function __construct ($label, $description, $ldapName, $filter, $acl = "") function __construct (string $label, string $description, string $ldapName, $objectFilter = '', $acl = '')
{ {
parent::__construct($label, $description, $ldapName, TRUE, 'server', NULL, $filter, $acl); parent::__construct($label, $description, $ldapName, TRUE, ['server'], 'dn', 'nameAttr', $objectFilter, $acl);
$this->setInLdap(FALSE); $this->setInLdap(FALSE);
} }
} }
......
Markdown is supported
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