{"action":"created","issue":{"url":"https://api.github.com/repos/hasgeek/lastuser/issues/216","repository_url":"https://api.github.com/repos/hasgeek/lastuser","labels_url":"https://api.github.com/repos/hasgeek/lastuser/issues/216/labels{/name}","comments_url":"https://api.github.com/repos/hasgeek/lastuser/issues/216/comments","events_url":"https://api.github.com/repos/hasgeek/lastuser/issues/216/events","html_url":"https://github.com/hasgeek/lastuser/issues/216","id":248327395,"node_id":"MDU6SXNzdWUyNDgzMjczOTU=","number":216,"title":"Disambiguate authorship from ownership","user":{"login":"jace","id":26695,"node_id":"MDQ6VXNlcjI2Njk1","avatar_url":"https://avatars1.githubusercontent.com/u/26695?v=4","gravatar_id":"","url":"https://api.github.com/users/jace","html_url":"https://github.com/jace","followers_url":"https://api.github.com/users/jace/followers","following_url":"https://api.github.com/users/jace/following{/other_user}","gists_url":"https://api.github.com/users/jace/gists{/gist_id}","starred_url":"https://api.github.com/users/jace/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jace/subscriptions","organizations_url":"https://api.github.com/users/jace/orgs","repos_url":"https://api.github.com/users/jace/repos","events_url":"https://api.github.com/users/jace/events{/privacy}","received_events_url":"https://api.github.com/users/jace/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/hasgeek/lastuser/milestones/2","html_url":"https://github.com/hasgeek/lastuser/milestone/2","labels_url":"https://api.github.com/repos/hasgeek/lastuser/milestones/2/labels","id":2680370,"node_id":"MDk6TWlsZXN0b25lMjY4MDM3MA==","number":2,"title":"Reorganise users, teams and organizations","description":"The `User`, `Team` and `Organization` models were originally modeled on GitHub's, with little insight on how we were going to use them. We've since learnt they weren't suitable for use cases and some reorganization is necessary.","creator":{"login":"jace","id":26695,"node_id":"MDQ6VXNlcjI2Njk1","avatar_url":"https://avatars1.githubusercontent.com/u/26695?v=4","gravatar_id":"","url":"https://api.github.com/users/jace","html_url":"https://github.com/jace","followers_url":"https://api.github.com/users/jace/followers","following_url":"https://api.github.com/users/jace/following{/other_user}","gists_url":"https://api.github.com/users/jace/gists{/gist_id}","starred_url":"https://api.github.com/users/jace/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jace/subscriptions","organizations_url":"https://api.github.com/users/jace/orgs","repos_url":"https://api.github.com/users/jace/repos","events_url":"https://api.github.com/users/jace/events{/privacy}","received_events_url":"https://api.github.com/users/jace/received_events","type":"User","site_admin":false},"open_issues":10,"closed_issues":10,"state":"open","created_at":"2017-08-04T06:22:36Z","updated_at":"2018-10-01T17:17:51Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2017-08-07T07:22:28Z","updated_at":"2018-10-01T17:17:51Z","closed_at":"2018-10-01T17:17:51Z","author_association":"MEMBER","body":"Lastuser (and most HasGeek apps) currently use the `user_id` column to refer to the user who owns the given object.\r\n\r\nWith the move to principals in #91, we need to disambiguate ownership (any principal can be an owner) from authorship (only a user can be an author as teams and organizations are non-human).\r\n\r\nProposal:\r\n\r\n1. Reduce the scope of the `user_id` column to only refer to authorship. It continues to point to a `User` instance.\r\n2. Where the possibility of ownership by a non-human exists (almost everywhere), add a `principal_id` column that refers to the `Principal`.\r\n3. When adding functionality to convert a User account into an Organization account (ticket pending), the split process (reverse of the current `merge_users`) should preserve the `user_id` column while changing the value of the `principal_id` column.\r\n\r\nAlternative proposal: using `user_id` and `principal_id` leaves some ambiguity on which is for what. Use the new column names `author_id` and `owner_id` instead."},"comment":{"url":"https://api.github.com/repos/hasgeek/lastuser/issues/comments/425989516","html_url":"https://github.com/hasgeek/lastuser/issues/216#issuecomment-425989516","issue_url":"https://api.github.com/repos/hasgeek/lastuser/issues/216","id":425989516,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNTk4OTUxNg==","user":{"login":"jace","id":26695,"node_id":"MDQ6VXNlcjI2Njk1","avatar_url":"https://avatars1.githubusercontent.com/u/26695?v=4","gravatar_id":"","url":"https://api.github.com/users/jace","html_url":"https://github.com/jace","followers_url":"https://api.github.com/users/jace/followers","following_url":"https://api.github.com/users/jace/following{/other_user}","gists_url":"https://api.github.com/users/jace/gists{/gist_id}","starred_url":"https://api.github.com/users/jace/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jace/subscriptions","organizations_url":"https://api.github.com/users/jace/orgs","repos_url":"https://api.github.com/users/jace/repos","events_url":"https://api.github.com/users/jace/events{/privacy}","received_events_url":"https://api.github.com/users/jace/received_events","type":"User","site_admin":false},"created_at":"2018-10-01T17:17:51Z","updated_at":"2018-10-01T17:17:51Z","author_association":"MEMBER","body":"This is no longer relevant to Lastuser as we are removing functionality here, and Principal will not be implemented. Perhaps the only relevance is for clients, to track which user created a client. However, that too is in question as clients will be mandatorily owned by users when #232 is implemented."}}
{"actor":{"display_login":"jace"}}