Introduced wmdeGroup which is a posxGroup derived class to manage also groupOfNames

This commit is contained in:
Tobias Herre 2020-08-24 23:20:16 +02:00
parent 7d08b8d6cb
commit f9a8baa956
3 changed files with 29 additions and 2 deletions

23
files/wmdeGroup.inc Normal file
View File

@ -0,0 +1,23 @@
<?php
use \LAM\TYPES\TypeManager;
use function LAM\TYPES\getScopeFromTypeId;
use LAM\TYPES\ConfiguredType;
class wmdeGroup extends posixGroup
{
function display_html_attributes() {
if (!$this->attributes['member']){
$this->attributes['member']=array(
"cn=dummy"
);
}
return parent::display_html_attributes();
}
function get_metaData() {
$return = parent::get_metaData();
$return['objectClasses'] = array('posixGroup','groupOfNames');
$return['attributes'] = array('gidNumber', $this->passwordAttrName, 'memberUid','member');
return $return;
}
}

View File

@ -76,6 +76,10 @@ class wmdeit_ldap::lam(
} ->
file {"$docroot/config/pdf":
ensure => directory,
} ->
file {"$docroot/lib/modules/wmdeGroup.inc":
ensure => file,
content => file("wmdeit_ldap/wmdeGroup.inc")
}
$configs.each | String $name, $conf | {

View File

@ -55,7 +55,7 @@ types: modules_user: inetOrgPerson,posixAccount,shadowAccount
types: suffix_group: ou=group,dc=wikimedia,dc=de
types: attr_group: #cn;#gidNumber;#memberUID;#description
types: modules_group: posixGroup
types: modules_group: wmdeGroup
# Password mail subject
lamProMailSubject: Your password was reset