linkorb / org-sync
Organization sync library
v1.1.0
2019-08-12 13:56 UTC
Requires
- php: ^7.2
- ext-json: *
- doctrine/annotations: ^1.6
- knplabs/github-api: ^2.11
- php-http/guzzle6-adapter: ^1.1
- symfony/cache: ^4.3
- symfony/property-access: ^4.3
- symfony/property-info: ^4.3
- symfony/serializer: ^4.3
Requires (Dev)
- phpunit/phpunit: ^8
This package is auto-updated.
Last update: 2024-11-22 23:57:47 UTC
README
Load an organizational structure (users + groups) from array. Push this data to multiple adapters
"Push" in this case means "Create or Update or Remove". When a User or Group is present in the backend service, but not in the local Organization object, the object should also be removed on the remote service.
List of adapters:
- GitHub (WIP)
- Camunda
- LDAP (Planned)
- MatterMost (Planned)
Installation
Install the latest version with:
$ composer require linkorb/org-sync
Usage
LinkORB\OrgSync\SynchronizationMediator\SynchronizationMediator
performs basic syncing operations such as:
- sync organization
- sync user
- sync group
- set password
- pull organization (planned)
$organization = $this->synchronizationMediator->initialize( $targetsArray, $organizationArray ); $this->synchronizationMediator->pushOrganization($organization);
Examples
Organization structure:
Array ( [name] => Organization name [users] => Array ( [username] => Array ( [email] => user@email [displayName] => User Name [avatar] => https://example.com/user_avatar.gif [properties] => Array ( [key] => value ) ) ) [groups] => Array ( [group name] => Array [parent] => parent group name [displayName] => Group [avatar] => https://example.com/team_avatar.png [members] => Array ( [0] => member1 [1] => member2 ) [properties] => Array ( [key] => value ) [targets] => Array ( [0] => target name ) ) ) )
Empty members
and/or targets
section under groups
means all members
and/or targets
for that group.
Targets structure:
Array ( [targetName] => Array ( [type] => targetType [baseUrl] => http://172.17.0.1:8080/engine-rest/ ) )