{"action":"created","issue":{"url":"https://api.github.com/repos/ARGOeu/argo-messaging/issues/69","repository_url":"https://api.github.com/repos/ARGOeu/argo-messaging","labels_url":"https://api.github.com/repos/ARGOeu/argo-messaging/issues/69/labels{/name}","comments_url":"https://api.github.com/repos/ARGOeu/argo-messaging/issues/69/comments","events_url":"https://api.github.com/repos/ARGOeu/argo-messaging/issues/69/events","html_url":"https://github.com/ARGOeu/argo-messaging/pull/69","id":178374774,"number":69,"title":"ARGO-514 API Call to create user","user":{"login":"kaggis","id":6143589,"avatar_url":"https://avatars.githubusercontent.com/u/6143589?v=3","gravatar_id":"","url":"https://api.github.com/users/kaggis","html_url":"https://github.com/kaggis","followers_url":"https://api.github.com/users/kaggis/followers","following_url":"https://api.github.com/users/kaggis/following{/other_user}","gists_url":"https://api.github.com/users/kaggis/gists{/gist_id}","starred_url":"https://api.github.com/users/kaggis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaggis/subscriptions","organizations_url":"https://api.github.com/users/kaggis/orgs","repos_url":"https://api.github.com/users/kaggis/repos","events_url":"https://api.github.com/users/kaggis/events{/privacy}","received_events_url":"https://api.github.com/users/kaggis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-21T15:05:32Z","updated_at":"2016-10-06T19:09:51Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ARGOeu/argo-messaging/pulls/69","html_url":"https://github.com/ARGOeu/argo-messaging/pull/69","diff_url":"https://github.com/ARGOeu/argo-messaging/pull/69.diff","patch_url":"https://github.com/ARGOeu/argo-messaging/pull/69.patch"},"body":"## Goal\r\nImplement API Call to enable creating new users\r\n\r\n## Implemetation\r\n- [x] Update User Model with the new requested fields (uuid etc)\r\n- [x] Add InsertUser method on store package\r\n- [x] Add  UserCreate method on auth package\r\n- [x] Add UserCreate handler for the request\r\n- [x] Update docs\r\n\r\n-----------------------------------------\r\n## Refactoring\r\n- [x] Refactor users to exist outside of projects (service wide)\r\n- [x] Refactor user models and methods to support multiple projects and roles:\r\nEach user definition now supports a list of projects in which a user participates accompanied with a list of roles for each project. For example:\r\n```json\r\n{\r\n  \"name\": \"UserX\",\r\n  \"token\": \"S3CR3T\",\r\n  \"email\": \"foo@email-foo.coml\",\r\n  \"service_admin\": false,\r\n  \"projects\": [\r\n    {\r\n      \"project_uuid\": \"uuid0\",\r\n      \"roles\": [\r\n        \"admin\"\r\n      ]\r\n    },\r\n    {\r\n      \"project_uuid\": \"uuid2\",\r\n      \"roles\": [\r\n        \"viewer\",\r\n        \"consumer\"\r\n      ]\r\n    }\r\n  ]\r\n}\r\n```\r\n\r\nEach user has a seperate field to denote if is a service_admin or not. The role `service_admin` exists outside of projects and is service-wide. \r\n\r\n## Fixes\r\n- [x] Fixed project update method"},"comment":{"url":"https://api.github.com/repos/ARGOeu/argo-messaging/issues/comments/252059736","html_url":"https://github.com/ARGOeu/argo-messaging/pull/69#issuecomment-252059736","issue_url":"https://api.github.com/repos/ARGOeu/argo-messaging/issues/69","id":252059736,"user":{"login":"kaggis","id":6143589,"avatar_url":"https://avatars.githubusercontent.com/u/6143589?v=3","gravatar_id":"","url":"https://api.github.com/users/kaggis","html_url":"https://github.com/kaggis","followers_url":"https://api.github.com/users/kaggis/followers","following_url":"https://api.github.com/users/kaggis/following{/other_user}","gists_url":"https://api.github.com/users/kaggis/gists{/gist_id}","starred_url":"https://api.github.com/users/kaggis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaggis/subscriptions","organizations_url":"https://api.github.com/users/kaggis/orgs","repos_url":"https://api.github.com/users/kaggis/repos","events_url":"https://api.github.com/users/kaggis/events{/privacy}","received_events_url":"https://api.github.com/users/kaggis/received_events","type":"User","site_admin":false},"created_at":"2016-10-06T19:09:50Z","updated_at":"2016-10-06T19:09:50Z","body":"please review\r\n/cc @themiszamani "}}
{"actor":{"display_login":"kaggis"}}