array( 'LSdyngroup', 'posixGroup', ), 'rdn' => 'cn', 'container_dn' => 'ou=dyngroups', 'container_auto_create' => array( 'objectclass' => array( 'top', 'organizationalUnit', ), 'attrs' => array( 'ou' => 'dyngroups', ), ), 'display_name_format' => '%{cn}', 'label' => 'Dynamic groups', 'customActions' => array ( 'showTechInfo' => array ( 'function' => 'showTechInfo', 'label' => 'Show technical information', 'hideLabel' => True, 'noConfirmation' => true, 'disableOnSuccessMsg' => true, 'icon' => 'tech_info', 'rights' => array ( 'admin', ), ), 'updateDynGroupMembersCache' => array ( 'function' => 'updateDynGroupMembersCache', 'label' => 'Update members cache', 'question_format' => 'Are you sure you want to update members cache of this dynamic group ?', 'onSuccessMsgFormat' => 'Members cache updated.', 'icon' => 'refresh', 'rights' => array ( 'admin', ), ), ), 'LSsearch' => array ( 'attrs' => array ( 'cn', 'gidNumber' => array ( 'searchLSformat' => '(gidNumber=%{pattern})', 'approxLSformat' => '(gidNumber=%{pattern})', ), 'description', ), 'params' => array ( 'sortBy' => 'displayName' ), 'customActions' => array ( 'updateDynGroupsMembersCache' => array ( 'function' => 'updateDynGroupsMembersCache', 'label' => 'Update members cache', 'question_format' => 'Are you sure you want to update members cache of all dynamic groups (could be quite long) ?', 'onSuccessMsgFormat' => 'Dynamic groups members cache updated.', 'icon' => 'refresh', 'rights' => array ( 'admin', ), ), ), ), 'after_create' => 'updateDynGroupMembersCache', 'attrs' => array ( /* ----------- start -----------*/ 'cn' => array ( 'label' => 'Name', 'ldap_type' => 'ascii', 'html_type' => 'text', 'required' => 1, 'check_data' => array ( 'alphanumeric' => array( 'msg' => 'Name must contain alphanumeric values only.', ), ), 'validation' => array ( array ( 'filter' => 'cn=%{val}', 'result' => 0, ), ), 'view' => 1, 'rights' => array( 'user' => 'r', 'admin' => 'w', 'godfather' => 'r', ), 'form' => array ( 'modify' => 1, 'create' => 1, ), ), /* ----------- end -----------*/ /* ----------- start -----------*/ 'gidNumber' => array ( 'label' => 'Identifier', 'ldap_type' => 'numeric', 'html_type' => 'text', 'required' => 1, 'generate_function' => 'generate_samba_gidNumber', 'validation' => array ( array ( 'filter' => 'gidNumber=%{val}', 'result' => 0, ), ), 'view' => 1, 'rights' => array( 'user' => 'r', 'admin' => 'w', ), 'form' => array ( 'modify' => 1, ), ), /* ----------- end -----------*/ /* ----------- start -----------*/ 'lsDynGroupMemberDnURI' => array ( 'label' => 'Member search URI', 'help_info' => "

LDAP search URI or group members. A LDAP search URI is composed of the following parts separated by semicolons :

Example : ldap:///ou=people,o=ls??one?(&(objectClass=lspeople)(mail=*@ls.com))

", 'ldap_type' => 'ascii', 'html_type' => 'textarea', 'required' => 0, 'default_value' => 'ldap:///ou=people,o=ls??one?(objectClass=lspeople)', 'check_data' => array ( 'ldapSearchURI' => array( 'msg' => "Invalid LDAP search URI.", ), ), 'view' => 1, 'rights' => array( 'admin' => 'w', ), 'form' => array ( 'modify' => 1, 'create' => 1, ), 'dependAttrs' => array( 'lsDynGroupMemberUidURI' ), 'after_modify' => array( 'updateDynGroupMembersCache', ), ), /* ----------- end -----------*/ /* ----------- start -----------*/ 'lsDynGroupMemberUidURI' => array ( 'label' => 'Member search URI (UID)', 'ldap_type' => 'ascii', 'html_type' => 'textarea', 'required' => 0, 'generate_function' => 'generateDyngroupMemberUidURI', 'rights' => array( 'admin' => 'w', ), ), /* ----------- end -----------*/ /* ----------- start -----------*/ 'lsDynGroupMemberDn' => array ( 'label' => 'Members', 'ldap_type' => 'ascii', 'html_type' => 'select_object', 'html_options' => array( 'selectable_object' => array( 'object_type' => 'LSpeople', 'display_name_format' => '%{cn} (%{dn})', 'value_attribute' => 'dn', ), ), 'required' => 0, 'multiple' => 1, 'view' => 1, 'rights' => array( 'user' => 'r', 'admin' => 'w', 'godfather' => 'w', ), ), /* ----------- end -----------*/ /* ----------- start -----------*/ 'lsDynGroupMemberUid' => array ( 'label' => 'Members UID', 'ldap_type' => 'ascii', 'html_type' => 'select_object', 'html_options' => array( 'selectable_object' => array( 'object_type' => 'LSpeople', 'display_name_format' => '%{cn} (%{uid})', 'value_attribute' => 'uid', ) ), 'required' => 0, 'multiple' => 1, 'view' => 1, 'rights' => array( 'user' => 'r', 'admin' => 'w', 'godfather' => 'w', ), ), /* ----------- end -----------*/ /* ----------- start -----------*/ 'uniqueMember' => array ( 'label' => 'Members (cache)', 'ldap_type' => 'ascii', 'html_type' => 'select_object', 'html_options' => array( 'selectable_object' => array( array( 'object_type' => 'LSpeople', 'display_name_format' => '%{cn} (%{dn})', 'value_attribute' => 'dn', ), ), 'ordered' => true, ), 'required' => 0, 'multiple' => 1, 'validation' => array ( array ( 'object_type' => 'LSpeople', 'basedn' => '%{val}', 'result' => 1, ), ), 'view' => 1, 'rights' => array( 'admin' => 'w', 'admingroup' => 'w', 'godfather' => 'w', ), ), /* ----------- end -----------*/ /* ----------- start -----------*/ 'memberUid' => array ( 'label' => 'Members UID (cache)', 'ldap_type' => 'ascii', 'html_type' => 'select_object', 'html_options' => array( 'selectable_object' => array( array( 'object_type' => 'LSpeople', 'display_name_format' => '%{cn} (%{uid})', 'value_attribute' => 'uid', ), ), 'ordered' => true, ), 'required' => 0, 'multiple' => 1, 'validation' => array ( array ( 'object_type' => 'LSpeople', 'filter' => '(uid=%{val})', 'result' => 1, ), ), 'view' => 1, 'rights' => array( 'admin' => 'w', 'admingroup' => 'w', 'godfather' => 'w', ), ), /* ----------- end -----------*/ /* ----------- start -----------*/ 'description' => array ( 'label' => 'Description', 'ldap_type' => 'ascii', 'html_type' => 'textarea', 'multiple' => 1, 'rights' => array( 'user' => 'r', 'admin' => 'w', 'godfather' => 'r', ), 'view' => 1, 'form' => array ( 'modify' => 1, 'create' => 1, ), ), /* ----------- end -----------*/ /* ----------- start -----------*/ 'lsGodfatherDn' => array ( 'label' => 'Accountable(s)', 'ldap_type' => 'ascii', 'html_type' => 'select_object', 'html_options' => array ( 'selectable_object' => array( 'object_type' => 'LSpeople', 'value_attribute' => 'dn', ), ), 'validation' => array ( array ( 'basedn' => '%{val}', 'result' => 1, 'msg' => "One or several of these users don't exist.", ), ), 'multiple' => 0, 'rights' => array( 'admin' => 'w', ), 'view' => 1, 'form' => array ( 'modify' => 1, 'create' => 1, ), ), /* ----------- end -----------*/ ), );