{"action":"opened","issue":{"url":"https://api.github.com/repos/thorin/redmine_ldap_sync/issues/174","repository_url":"https://api.github.com/repos/thorin/redmine_ldap_sync","labels_url":"https://api.github.com/repos/thorin/redmine_ldap_sync/issues/174/labels{/name}","comments_url":"https://api.github.com/repos/thorin/redmine_ldap_sync/issues/174/comments","events_url":"https://api.github.com/repos/thorin/redmine_ldap_sync/issues/174/events","html_url":"https://github.com/thorin/redmine_ldap_sync/issues/174","id":164817723,"number":174,"title":"Plugin doesn't sync groups","user":{"login":"kayrus","id":4047483,"avatar_url":"https://avatars.githubusercontent.com/u/4047483?v=3","gravatar_id":"","url":"https://api.github.com/users/kayrus","html_url":"https://github.com/kayrus","followers_url":"https://api.github.com/users/kayrus/followers","following_url":"https://api.github.com/users/kayrus/following{/other_user}","gists_url":"https://api.github.com/users/kayrus/gists{/gist_id}","starred_url":"https://api.github.com/users/kayrus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kayrus/subscriptions","organizations_url":"https://api.github.com/users/kayrus/orgs","repos_url":"https://api.github.com/users/kayrus/repos","events_url":"https://api.github.com/users/kayrus/events{/privacy}","received_events_url":"https://api.github.com/users/kayrus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-07-11T11:39:56Z","updated_at":"2016-07-11T11:39:56Z","closed_at":null,"body":"For some reason plugin doesn't sync groups. And it doesn't should groups on the \"Synchronization actions\" tab.\r\n\r\nHere is what I get on test page:\r\n\r\n```\r\nUser \"user1\": \r\n    First name = user\r\n    Last name = name\r\n    Email = user@example.com\r\n    Groups = []\r\n\r\nGroup \"Groupname\": \r\n    No fields\r\n\r\nUsers enabled: a total of 3\r\n    [\"user1\",\"user2\",\"user3\"]\r\n\r\nGroups: a total of 2\r\n    [\"\"Groupname\", \"admin\"]\r\n\r\nLDAP attributes on a user:\r\n    [:dn, :sshpublickey, :userpassword, :givenname, :loginshell, :o, :preferredlanguage, :sn, :cn, :displayname, :gidnumber, :homedirectory, :mail, :uid, :uidnumber, :objectclass]\r\n\r\nLDAP attributes on a group:\r\n    [:dn, :uniquemember, :cn, :objectclass]\r\n\r\nLog messages:\r\n-- Found 3 users active, 0 locked and 0 deleted on ldap\r\n```\r\n\r\nIt seems that plugin tries to sync groups by `group_fields_to_sync` stored in settings. But for some reason this option set to empty (checked directly using SQL query):\r\n\r\n```\r\n  groups_base_dn: ou=Groups,dc=example,dc=com\r\n  class_user: posixAccount\r\n  users_search_scope: subtree\r\n  class_group: groupofuniquenames\r\n  groupname_pattern: ''\r\n  group_search_filter: ''\r\n  account_disabled_test: ''\r\n  group_membership: on_groups\r\n  nested_groups: ''\r\n  groupname: cn\r\n  account_flags: ''\r\n  primary_group: gidNumber\r\n  member: uniqueMember\r\n  user_memberid: uid\r\n  user_groups: ''\r\n  groupid: ''\r\n  parent_group: ''\r\n  group_parentid: ''\r\n  member_group: ''\r\n  group_memberid: ''\r\n  sync_on_login: user_fields_and_groups\r\n  required_group: ''\r\n  admin_group: admin\r\n  fixed_group: ''\r\n  create_users: '0'\r\n  create_groups: '0'\r\n  dyngroups: ''\r\n  dyngroups_cache_ttl: ''\r\n  user_fields_to_sync:\r\n  - firstname\r\n  - lastname\r\n  - mail\r\n  user_ldap_attrs: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}\r\n  group_fields_to_sync: []\r\n  group_ldap_attrs: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}\r\n```\r\n\r\nWhat do I need to do to enable users and groups sync?"}}
{"actor":{"display_login":"kayrus"}}