{"action":"opened","issue":{"url":"https://api.github.com/repos/Wakanda/wakanda-issues/issues/264","repository_url":"https://api.github.com/repos/Wakanda/wakanda-issues","labels_url":"https://api.github.com/repos/Wakanda/wakanda-issues/issues/264/labels{/name}","comments_url":"https://api.github.com/repos/Wakanda/wakanda-issues/issues/264/comments","events_url":"https://api.github.com/repos/Wakanda/wakanda-issues/issues/264/events","html_url":"https://github.com/Wakanda/wakanda-issues/issues/264","id":333446043,"node_id":"MDU6SXNzdWUzMzM0NDYwNDM=","number":264,"title":"SetLoginManager is not keeping group memberhips.","user":{"login":"erlicthemad","id":868472,"node_id":"MDQ6VXNlcjg2ODQ3Mg==","avatar_url":"https://avatars3.githubusercontent.com/u/868472?v=4","gravatar_id":"","url":"https://api.github.com/users/erlicthemad","html_url":"https://github.com/erlicthemad","followers_url":"https://api.github.com/users/erlicthemad/followers","following_url":"https://api.github.com/users/erlicthemad/following{/other_user}","gists_url":"https://api.github.com/users/erlicthemad/gists{/gist_id}","starred_url":"https://api.github.com/users/erlicthemad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erlicthemad/subscriptions","organizations_url":"https://api.github.com/users/erlicthemad/orgs","repos_url":"https://api.github.com/users/erlicthemad/repos","events_url":"https://api.github.com/users/erlicthemad/events{/privacy}","received_events_url":"https://api.github.com/users/erlicthemad/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-18T21:44:11Z","updated_at":"2018-06-18T21:44:11Z","closed_at":null,"author_association":"NONE","body":"If you use the loginByPassword function and pass a username and password using 4D to authenticate the belongsTo section will not be kept. \r\n\r\nTo see this I use the following test code.\r\n\r\nUsername and Password need to be a 4D database only account.  I have fully replicated my 4D database Groups and Groups hierarchy on the Wakanda Directory. I have no users listed in the directory, just groups.\r\n\r\nThe following code block is what I am running to see what my login function is doing.\r\n\r\n```\r\nuserLocal = directory.loginByPassword('username', '*********');\r\nconsole.info('User1 login status: ' + userLocal, currentUser);\r\nconsole.info('Group Membership', currentUser.getParents(false));\r\nconsole.info('session Storage logged in', sessionStorage);\r\nlogout = directory.logout();\r\n\r\n```\r\n\r\nIf you run this function. You will see the following results showing up in the console. \r\n\r\n2018-06-18 17:29:39 [wakanda.SecurityBackend] INFO - User1 login status: true {\"storage\":{},\"ID\":\"AAD66B1044A243D89DC1B71AF222D0CC\",\"fullName\":\"myFullName\",\"name\":\"shortname\"}\r\n2018-06-18 17:29:39 [wakanda.SecurityBackend] INFO - Group Membership []\r\n2018-06-18 17:29:39 [wakanda.SecurityBackend] INFO - session Storage logged in {\"time\":\"2018-06-18T21:29:39.258Z\"}\r\n2018-06-18 17:29:39 [wakanda.SecurityBackend] INFO - User1 logout Status true {\"storage\":{},\"ID\":\"00000000000000000000000000000000\",\"fullName\":\"default guest\",\"name\":\"default guest\"}\r\n\r\nIn the group membership there should be 4 groups. The groups section of the directory is fully populated with the groups from 4D.  And the inheritance of the directory for groups is also in sync with my 4D data source.\r\n\r\nThis is the object being returned from the login listener method.\r\n\r\n{\"ID\":\"AAD66B1044A243D89DC1B71AF222D0CC\",\"name\":\"shortname\",\"fullName\":\"myFullName\",\"storage\":{\"time\":\"2018-06-18T21:29:39.258Z\"},\"belongsTo\":[\"PROGRAMMERS\",\"USER\",\"Remote Investigator\",\"4DMobile\"]}\r\n\r\nIn this case I should be seeing my 4 groups in the Group Membership line of the log.\r\n[\"PROGRAMMERS\",\"USER\",\"Remote Investigator\",\"4DMobile\"]\r\n\r\n"}}
{"actor":{"display_login":"erlicthemad"}}