Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thorsten-l/ldap2zammad
ldap2zammad synchronizer
https://github.com/thorsten-l/ldap2zammad
ldap zammad
Last synced: about 1 month ago
JSON representation
ldap2zammad synchronizer
- Host: GitHub
- URL: https://github.com/thorsten-l/ldap2zammad
- Owner: thorsten-l
- License: apache-2.0
- Created: 2023-08-30T11:15:41.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-22T10:26:19.000Z (10 months ago)
- Last Synced: 2024-05-02T05:20:17.406Z (8 months ago)
- Topics: ldap, zammad
- Language: Java
- Homepage:
- Size: 173 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ldap2zammad
Create, update and delete zammad user entries from a selected LDAP directory server.
## LDAP to Zammad attribute mapping
The mapping will be done within a JavaScript function.
This `function` will be executed for every entry in the LDAP resultset.
```javascript
(
function ldap2zammad( mode, zammadUser, ldapEntry, config )
{
// mode : "test", "create, "update"
zammadUser.setFirstname(ldapEntry.getAttributeValue("givenname"));
zammadUser.setLastname(ldapEntry.getAttributeValue("sn"));
zammadUser.setEmail(ldapEntry.getAttributeValue("mail"));
zammadUser.setPhone(ldapEntry.getAttributeValue("telephoneNumber"));
zammadUser.setFax(ldapEntry.getAttributeValue("facsimileTelephoneNumber"));
zammadUser.setWeb("https://www.myorg.de");
zammadUser.setOrganization("MyOrg");
zammadUser.setVerified(true);if ( "create" === mode || "test" === mode )
{
if ( ldapEntry.getAttributeValue("institute") === "CC" )
{
zammadUser.setDepartment( "CC" );
zammadUser.setRoles( [ "Agent", "Customer" ] );
}
else
{
zammadUser.setRoles( [ "Customer" ] ); // array of String
}
}
}
);
```