{"action":"created","comment":{"url":"https://api.github.com/repos/pimutils/vdirsyncer/pulls/comments/78589703","id":78589703,"diff_hunk":"@@ -0,0 +1,84 @@\n+# -*- coding: utf-8 -*-\n+import logging\n+import ldap3\n+\n+from .base import Item, Storage\n+from .. import exceptions\n+\n+ldap_logger = logging.getLogger(__name__)\n+\n+\n+class LDAPStorage(Storage):\n+\n+    __doc__ = '''","path":"vdirsyncer/storage/ldap.py","position":null,"original_position":13,"commit_id":"0959a1641ea4f9e9691fafd9cc0c8b1932f38004","original_commit_id":"69698dae0945ecbf57a570aff33e91a220f792b8","user":{"login":"paulfariello","id":273684,"avatar_url":"https://avatars.githubusercontent.com/u/273684?v=3","gravatar_id":"","url":"https://api.github.com/users/paulfariello","html_url":"https://github.com/paulfariello","followers_url":"https://api.github.com/users/paulfariello/followers","following_url":"https://api.github.com/users/paulfariello/following{/other_user}","gists_url":"https://api.github.com/users/paulfariello/gists{/gist_id}","starred_url":"https://api.github.com/users/paulfariello/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulfariello/subscriptions","organizations_url":"https://api.github.com/users/paulfariello/orgs","repos_url":"https://api.github.com/users/paulfariello/repos","events_url":"https://api.github.com/users/paulfariello/events{/privacy}","received_events_url":"https://api.github.com/users/paulfariello/received_events","type":"User","site_admin":false},"body":"Thanks for the quick reply.\n\nI'm now using vobject which is clearly cleaner. Thanks for the hint.\nI've also added support for title and fax.\n\nI changed the default filter to one that make sense since `vobject`\nclearly states that `F` and `FN` are mandatory fields. On some dirty\nldap directory `sn` or `givenName` could be missing and I'm not sure how to\nhandle it cleanly without filtering it. Maybe just provide the available\n`family` or `givenname` for `N`.\n\nAbout tests, I'm not sure how we could test it against a real ldap\nserver. I don't know any open ldap server but I can check.\n\nNote that the ldap attributes I'm using are from Active Directory. Any\nother ldap directory could also use it but this is not guaranteed. The\nmost problematic attribute is `whenChanged`. I've never seen it on other\nclassic ldap directory and it's used for etag.\n\n-- \nPaul Fariello\n\nPGP: 0x672CDD2031AAF49B\n","created_at":"2016-09-13T15:59:16Z","updated_at":"2016-09-13T15:59:16Z","html_url":"https://github.com/pimutils/vdirsyncer/pull/500#discussion_r78589703","pull_request_url":"https://api.github.com/repos/pimutils/vdirsyncer/pulls/500","_links":{"self":{"href":"https://api.github.com/repos/pimutils/vdirsyncer/pulls/comments/78589703"},"html":{"href":"https://github.com/pimutils/vdirsyncer/pull/500#discussion_r78589703"},"pull_request":{"href":"https://api.github.com/repos/pimutils/vdirsyncer/pulls/500"}}},"pull_request":{"url":"https://api.github.com/repos/pimutils/vdirsyncer/pulls/500","id":85057709,"html_url":"https://github.com/pimutils/vdirsyncer/pull/500","diff_url":"https://github.com/pimutils/vdirsyncer/pull/500.diff","patch_url":"https://github.com/pimutils/vdirsyncer/pull/500.patch","issue_url":"https://api.github.com/repos/pimutils/vdirsyncer/issues/500","number":500,"state":"open","locked":false,"title":"Add ldap storage","user":{"login":"paulfariello","id":273684,"avatar_url":"https://avatars.githubusercontent.com/u/273684?v=3","gravatar_id":"","url":"https://api.github.com/users/paulfariello","html_url":"https://github.com/paulfariello","followers_url":"https://api.github.com/users/paulfariello/followers","following_url":"https://api.github.com/users/paulfariello/following{/other_user}","gists_url":"https://api.github.com/users/paulfariello/gists{/gist_id}","starred_url":"https://api.github.com/users/paulfariello/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulfariello/subscriptions","organizations_url":"https://api.github.com/users/paulfariello/orgs","repos_url":"https://api.github.com/users/paulfariello/repos","events_url":"https://api.github.com/users/paulfariello/events{/privacy}","received_events_url":"https://api.github.com/users/paulfariello/received_events","type":"User","site_admin":false},"body":"Current implementation is read only.\r\nNot sure if ldap storage is supposed to do vcard conversion.\r\n\r\nI haven't added tests nor documentation but will if @pimutils thinks this patch is meaningful.\r\n\r\nOther enhancement would be to allow for attributes configuration.\r\n\r\n----\r\n\r\nedit by @untitaker: Fix #283","created_at":"2016-09-13T14:21:43Z","updated_at":"2016-09-13T15:59:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ab1919de0d371ecbeb6053fb91cc97d64f40af24","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/pimutils/vdirsyncer/pulls/500/commits","review_comments_url":"https://api.github.com/repos/pimutils/vdirsyncer/pulls/500/comments","review_comment_url":"https://api.github.com/repos/pimutils/vdirsyncer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pimutils/vdirsyncer/issues/500/comments","statuses_url":"https://api.github.com/repos/pimutils/vdirsyncer/statuses/0959a1641ea4f9e9691fafd9cc0c8b1932f38004","head":{"label":"paulfariello:master","ref":"master","sha":"0959a1641ea4f9e9691fafd9cc0c8b1932f38004","user":{"login":"paulfariello","id":273684,"avatar_url":"https://avatars.githubusercontent.com/u/273684?v=3","gravatar_id":"","url":"https://api.github.com/users/paulfariello","html_url":"https://github.com/paulfariello","followers_url":"https://api.github.com/users/paulfariello/followers","following_url":"https://api.github.com/users/paulfariello/following{/other_user}","gists_url":"https://api.github.com/users/paulfariello/gists{/gist_id}","starred_url":"https://api.github.com/users/paulfariello/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulfariello/subscriptions","organizations_url":"https://api.github.com/users/paulfariello/orgs","repos_url":"https://api.github.com/users/paulfariello/repos","events_url":"https://api.github.com/users/paulfariello/events{/privacy}","received_events_url":"https://api.github.com/users/paulfariello/received_events","type":"User","site_admin":false},"repo":{"id":68095941,"name":"vdirsyncer","full_name":"paulfariello/vdirsyncer","owner":{"login":"paulfariello","id":273684,"avatar_url":"https://avatars.githubusercontent.com/u/273684?v=3","gravatar_id":"","url":"https://api.github.com/users/paulfariello","html_url":"https://github.com/paulfariello","followers_url":"https://api.github.com/users/paulfariello/followers","following_url":"https://api.github.com/users/paulfariello/following{/other_user}","gists_url":"https://api.github.com/users/paulfariello/gists{/gist_id}","starred_url":"https://api.github.com/users/paulfariello/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulfariello/subscriptions","organizations_url":"https://api.github.com/users/paulfariello/orgs","repos_url":"https://api.github.com/users/paulfariello/repos","events_url":"https://api.github.com/users/paulfariello/events{/privacy}","received_events_url":"https://api.github.com/users/paulfariello/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/paulfariello/vdirsyncer","description":"Synchronize calendars and contacts","fork":true,"url":"https://api.github.com/repos/paulfariello/vdirsyncer","forks_url":"https://api.github.com/repos/paulfariello/vdirsyncer/forks","keys_url":"https://api.github.com/repos/paulfariello/vdirsyncer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/paulfariello/vdirsyncer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/paulfariello/vdirsyncer/teams","hooks_url":"https://api.github.com/repos/paulfariello/vdirsyncer/hooks","issue_events_url":"https://api.github.com/repos/paulfariello/vdirsyncer/issues/events{/number}","events_url":"https://api.github.com/repos/paulfariello/vdirsyncer/events","assignees_url":"https://api.github.com/repos/paulfariello/vdirsyncer/assignees{/user}","branches_url":"https://api.github.com/repos/paulfariello/vdirsyncer/branches{/branch}","tags_url":"https://api.github.com/repos/paulfariello/vdirsyncer/tags","blobs_url":"https://api.github.com/repos/paulfariello/vdirsyncer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/paulfariello/vdirsyncer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/paulfariello/vdirsyncer/git/refs{/sha}","trees_url":"https://api.github.com/repos/paulfariello/vdirsyncer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/paulfariello/vdirsyncer/statuses/{sha}","languages_url":"https://api.github.com/repos/paulfariello/vdirsyncer/languages","stargazers_url":"https://api.github.com/repos/paulfariello/vdirsyncer/stargazers","contributors_url":"https://api.github.com/repos/paulfariello/vdirsyncer/contributors","subscribers_url":"https://api.github.com/repos/paulfariello/vdirsyncer/subscribers","subscription_url":"https://api.github.com/repos/paulfariello/vdirsyncer/subscription","commits_url":"https://api.github.com/repos/paulfariello/vdirsyncer/commits{/sha}","git_commits_url":"https://api.github.com/repos/paulfariello/vdirsyncer/git/commits{/sha}","comments_url":"https://api.github.com/repos/paulfariello/vdirsyncer/comments{/number}","issue_comment_url":"https://api.github.com/repos/paulfariello/vdirsyncer/issues/comments{/number}","contents_url":"https://api.github.com/repos/paulfariello/vdirsyncer/contents/{+path}","compare_url":"https://api.github.com/repos/paulfariello/vdirsyncer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/paulfariello/vdirsyncer/merges","archive_url":"https://api.github.com/repos/paulfariello/vdirsyncer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/paulfariello/vdirsyncer/downloads","issues_url":"https://api.github.com/repos/paulfariello/vdirsyncer/issues{/number}","pulls_url":"https://api.github.com/repos/paulfariello/vdirsyncer/pulls{/number}","milestones_url":"https://api.github.com/repos/paulfariello/vdirsyncer/milestones{/number}","notifications_url":"https://api.github.com/repos/paulfariello/vdirsyncer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/paulfariello/vdirsyncer/labels{/name}","releases_url":"https://api.github.com/repos/paulfariello/vdirsyncer/releases{/id}","deployments_url":"https://api.github.com/repos/paulfariello/vdirsyncer/deployments","created_at":"2016-09-13T09:49:01Z","updated_at":"2016-09-13T09:49:02Z","pushed_at":"2016-09-13T15:49:35Z","git_url":"git://github.com/paulfariello/vdirsyncer.git","ssh_url":"git@github.com:paulfariello/vdirsyncer.git","clone_url":"https://github.com/paulfariello/vdirsyncer.git","svn_url":"https://github.com/paulfariello/vdirsyncer","homepage":"https://vdirsyncer.pimutils.org/","size":1732,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"pimutils:master","ref":"master","sha":"b0c498f70aa6614a92a3348af6929fdaa03aaa78","user":{"login":"pimutils","id":17852924,"avatar_url":"https://avatars.githubusercontent.com/u/17852924?v=3","gravatar_id":"","url":"https://api.github.com/users/pimutils","html_url":"https://github.com/pimutils","followers_url":"https://api.github.com/users/pimutils/followers","following_url":"https://api.github.com/users/pimutils/following{/other_user}","gists_url":"https://api.github.com/users/pimutils/gists{/gist_id}","starred_url":"https://api.github.com/users/pimutils/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pimutils/subscriptions","organizations_url":"https://api.github.com/users/pimutils/orgs","repos_url":"https://api.github.com/users/pimutils/repos","events_url":"https://api.github.com/users/pimutils/events{/privacy}","received_events_url":"https://api.github.com/users/pimutils/received_events","type":"Organization","site_admin":false},"repo":{"id":16865424,"name":"vdirsyncer","full_name":"pimutils/vdirsyncer","owner":{"login":"pimutils","id":17852924,"avatar_url":"https://avatars.githubusercontent.com/u/17852924?v=3","gravatar_id":"","url":"https://api.github.com/users/pimutils","html_url":"https://github.com/pimutils","followers_url":"https://api.github.com/users/pimutils/followers","following_url":"https://api.github.com/users/pimutils/following{/other_user}","gists_url":"https://api.github.com/users/pimutils/gists{/gist_id}","starred_url":"https://api.github.com/users/pimutils/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pimutils/subscriptions","organizations_url":"https://api.github.com/users/pimutils/orgs","repos_url":"https://api.github.com/users/pimutils/repos","events_url":"https://api.github.com/users/pimutils/events{/privacy}","received_events_url":"https://api.github.com/users/pimutils/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pimutils/vdirsyncer","description":"Synchronize calendars and contacts","fork":false,"url":"https://api.github.com/repos/pimutils/vdirsyncer","forks_url":"https://api.github.com/repos/pimutils/vdirsyncer/forks","keys_url":"https://api.github.com/repos/pimutils/vdirsyncer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pimutils/vdirsyncer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pimutils/vdirsyncer/teams","hooks_url":"https://api.github.com/repos/pimutils/vdirsyncer/hooks","issue_events_url":"https://api.github.com/repos/pimutils/vdirsyncer/issues/events{/number}","events_url":"https://api.github.com/repos/pimutils/vdirsyncer/events","assignees_url":"https://api.github.com/repos/pimutils/vdirsyncer/assignees{/user}","branches_url":"https://api.github.com/repos/pimutils/vdirsyncer/branches{/branch}","tags_url":"https://api.github.com/repos/pimutils/vdirsyncer/tags","blobs_url":"https://api.github.com/repos/pimutils/vdirsyncer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pimutils/vdirsyncer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pimutils/vdirsyncer/git/refs{/sha}","trees_url":"https://api.github.com/repos/pimutils/vdirsyncer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pimutils/vdirsyncer/statuses/{sha}","languages_url":"https://api.github.com/repos/pimutils/vdirsyncer/languages","stargazers_url":"https://api.github.com/repos/pimutils/vdirsyncer/stargazers","contributors_url":"https://api.github.com/repos/pimutils/vdirsyncer/contributors","subscribers_url":"https://api.github.com/repos/pimutils/vdirsyncer/subscribers","subscription_url":"https://api.github.com/repos/pimutils/vdirsyncer/subscription","commits_url":"https://api.github.com/repos/pimutils/vdirsyncer/commits{/sha}","git_commits_url":"https://api.github.com/repos/pimutils/vdirsyncer/git/commits{/sha}","comments_url":"https://api.github.com/repos/pimutils/vdirsyncer/comments{/number}","issue_comment_url":"https://api.github.com/repos/pimutils/vdirsyncer/issues/comments{/number}","contents_url":"https://api.github.com/repos/pimutils/vdirsyncer/contents/{+path}","compare_url":"https://api.github.com/repos/pimutils/vdirsyncer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pimutils/vdirsyncer/merges","archive_url":"https://api.github.com/repos/pimutils/vdirsyncer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pimutils/vdirsyncer/downloads","issues_url":"https://api.github.com/repos/pimutils/vdirsyncer/issues{/number}","pulls_url":"https://api.github.com/repos/pimutils/vdirsyncer/pulls{/number}","milestones_url":"https://api.github.com/repos/pimutils/vdirsyncer/milestones{/number}","notifications_url":"https://api.github.com/repos/pimutils/vdirsyncer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pimutils/vdirsyncer/labels{/name}","releases_url":"https://api.github.com/repos/pimutils/vdirsyncer/releases{/id}","deployments_url":"https://api.github.com/repos/pimutils/vdirsyncer/deployments","created_at":"2014-02-15T15:33:41Z","updated_at":"2016-09-12T10:55:17Z","pushed_at":"2016-09-13T15:49:35Z","git_url":"git://github.com/pimutils/vdirsyncer.git","ssh_url":"git@github.com:pimutils/vdirsyncer.git","clone_url":"https://github.com/pimutils/vdirsyncer.git","svn_url":"https://github.com/pimutils/vdirsyncer","homepage":"https://vdirsyncer.pimutils.org/","size":2541,"stargazers_count":307,"watchers_count":307,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":30,"mirror_url":null,"open_issues_count":36,"forks":30,"open_issues":36,"watchers":307,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pimutils/vdirsyncer/pulls/500"},"html":{"href":"https://github.com/pimutils/vdirsyncer/pull/500"},"issue":{"href":"https://api.github.com/repos/pimutils/vdirsyncer/issues/500"},"comments":{"href":"https://api.github.com/repos/pimutils/vdirsyncer/issues/500/comments"},"review_comments":{"href":"https://api.github.com/repos/pimutils/vdirsyncer/pulls/500/comments"},"review_comment":{"href":"https://api.github.com/repos/pimutils/vdirsyncer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pimutils/vdirsyncer/pulls/500/commits"},"statuses":{"href":"https://api.github.com/repos/pimutils/vdirsyncer/statuses/0959a1641ea4f9e9691fafd9cc0c8b1932f38004"}}}}
{"actor":{"display_login":"paulfariello"}}