{"action":"created","comment":{"url":"https://api.github.com/repos/vacationlabs/haskell-webapps/pulls/comments/84890708","pull_request_review_id":5638638,"id":84890708,"diff_hunk":"@@ -0,0 +1,63 @@\n+{-# LANGUAGE DeriveGeneric   #-}\n+module DBTypes where\n+\n+import Data.Aeson\n+import Data.Aeson.TH\n+import Data.Text\n+import GHC.Generics\n+import Control.Lens\n+import Types\n+import Models\n+\n+type TenantID = Key DBTenant\n+type Tenant = DBTenant\n+type TenantOutput = DBTenant\n+type UserID = Key DBUser\n+\n+data DBError = TenantNotFound TenantID\n+             | UserNotFound UserID deriving (Eq, Show)\n+data UserCreationError = UserExists Text\n+                       | TenantDoesn'tExist Text\n+                        deriving (Eq, Show)\n+\n+data Role = SiteAdmin","path":"ServantPersistent/src/DBTypes.hs","position":23,"original_position":23,"commit_id":"96f848a591d851105671ac104525dcef55f64eea","original_commit_id":"96f848a591d851105671ac104525dcef55f64eea","user":{"login":"saurabhnanda","id":28369,"avatar_url":"https://avatars.githubusercontent.com/u/28369?v=3","gravatar_id":"","url":"https://api.github.com/users/saurabhnanda","html_url":"https://github.com/saurabhnanda","followers_url":"https://api.github.com/users/saurabhnanda/followers","following_url":"https://api.github.com/users/saurabhnanda/following{/other_user}","gists_url":"https://api.github.com/users/saurabhnanda/gists{/gist_id}","starred_url":"https://api.github.com/users/saurabhnanda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saurabhnanda/subscriptions","organizations_url":"https://api.github.com/users/saurabhnanda/orgs","repos_url":"https://api.github.com/users/saurabhnanda/repos","events_url":"https://api.github.com/users/saurabhnanda/events{/privacy}","received_events_url":"https://api.github.com/users/saurabhnanda/received_events","type":"User","site_admin":false},"body":"Does the [roles list screen](https://vacationlabs.github.io/haskell-webapps/ui-mockups/roles.html) and [edit role screen](https://vacationlabs.github.io/haskell-webapps/ui-mockups/role-edit.html) make this clearer?","created_at":"2016-10-25T12:30:52Z","updated_at":"2016-10-25T12:30:52Z","html_url":"https://github.com/vacationlabs/haskell-webapps/pull/30#discussion_r84890708","pull_request_url":"https://api.github.com/repos/vacationlabs/haskell-webapps/pulls/30","_links":{"self":{"href":"https://api.github.com/repos/vacationlabs/haskell-webapps/pulls/comments/84890708"},"html":{"href":"https://github.com/vacationlabs/haskell-webapps/pull/30#discussion_r84890708"},"pull_request":{"href":"https://api.github.com/repos/vacationlabs/haskell-webapps/pulls/30"}}},"pull_request":{"url":"https://api.github.com/repos/vacationlabs/haskell-webapps/pulls/30","id":89488222,"html_url":"https://github.com/vacationlabs/haskell-webapps/pull/30","diff_url":"https://github.com/vacationlabs/haskell-webapps/pull/30.diff","patch_url":"https://github.com/vacationlabs/haskell-webapps/pull/30.patch","issue_url":"https://api.github.com/repos/vacationlabs/haskell-webapps/issues/30","number":30,"state":"open","locked":false,"title":"Authentication and some basic architecture ","user":{"login":"wz1000","id":4812498,"avatar_url":"https://avatars.githubusercontent.com/u/4812498?v=3","gravatar_id":"","url":"https://api.github.com/users/wz1000","html_url":"https://github.com/wz1000","followers_url":"https://api.github.com/users/wz1000/followers","following_url":"https://api.github.com/users/wz1000/following{/other_user}","gists_url":"https://api.github.com/users/wz1000/gists{/gist_id}","starred_url":"https://api.github.com/users/wz1000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wz1000/subscriptions","organizations_url":"https://api.github.com/users/wz1000/orgs","repos_url":"https://api.github.com/users/wz1000/repos","events_url":"https://api.github.com/users/wz1000/events{/privacy}","received_events_url":"https://api.github.com/users/wz1000/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-10-15T09:53:12Z","updated_at":"2016-10-25T12:30:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b73b8bbe49d6aaaf0ca432482de66209b0ec9973","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/vacationlabs/haskell-webapps/pulls/30/commits","review_comments_url":"https://api.github.com/repos/vacationlabs/haskell-webapps/pulls/30/comments","review_comment_url":"https://api.github.com/repos/vacationlabs/haskell-webapps/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vacationlabs/haskell-webapps/issues/30/comments","statuses_url":"https://api.github.com/repos/vacationlabs/haskell-webapps/statuses/96f848a591d851105671ac104525dcef55f64eea","head":{"label":"wz1000:master","ref":"master","sha":"96f848a591d851105671ac104525dcef55f64eea","user":{"login":"wz1000","id":4812498,"avatar_url":"https://avatars.githubusercontent.com/u/4812498?v=3","gravatar_id":"","url":"https://api.github.com/users/wz1000","html_url":"https://github.com/wz1000","followers_url":"https://api.github.com/users/wz1000/followers","following_url":"https://api.github.com/users/wz1000/following{/other_user}","gists_url":"https://api.github.com/users/wz1000/gists{/gist_id}","starred_url":"https://api.github.com/users/wz1000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wz1000/subscriptions","organizations_url":"https://api.github.com/users/wz1000/orgs","repos_url":"https://api.github.com/users/wz1000/repos","events_url":"https://api.github.com/users/wz1000/events{/privacy}","received_events_url":"https://api.github.com/users/wz1000/received_events","type":"User","site_admin":false},"repo":{"id":70571872,"name":"haskell-webapps","full_name":"wz1000/haskell-webapps","owner":{"login":"wz1000","id":4812498,"avatar_url":"https://avatars.githubusercontent.com/u/4812498?v=3","gravatar_id":"","url":"https://api.github.com/users/wz1000","html_url":"https://github.com/wz1000","followers_url":"https://api.github.com/users/wz1000/followers","following_url":"https://api.github.com/users/wz1000/following{/other_user}","gists_url":"https://api.github.com/users/wz1000/gists{/gist_id}","starred_url":"https://api.github.com/users/wz1000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wz1000/subscriptions","organizations_url":"https://api.github.com/users/wz1000/orgs","repos_url":"https://api.github.com/users/wz1000/repos","events_url":"https://api.github.com/users/wz1000/events{/privacy}","received_events_url":"https://api.github.com/users/wz1000/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wz1000/haskell-webapps","description":"Proof-of-concept code for a typical webapp implemented in various Haskell libraries/frameworks","fork":true,"url":"https://api.github.com/repos/wz1000/haskell-webapps","forks_url":"https://api.github.com/repos/wz1000/haskell-webapps/forks","keys_url":"https://api.github.com/repos/wz1000/haskell-webapps/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wz1000/haskell-webapps/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wz1000/haskell-webapps/teams","hooks_url":"https://api.github.com/repos/wz1000/haskell-webapps/hooks","issue_events_url":"https://api.github.com/repos/wz1000/haskell-webapps/issues/events{/number}","events_url":"https://api.github.com/repos/wz1000/haskell-webapps/events","assignees_url":"https://api.github.com/repos/wz1000/haskell-webapps/assignees{/user}","branches_url":"https://api.github.com/repos/wz1000/haskell-webapps/branches{/branch}","tags_url":"https://api.github.com/repos/wz1000/haskell-webapps/tags","blobs_url":"https://api.github.com/repos/wz1000/haskell-webapps/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wz1000/haskell-webapps/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wz1000/haskell-webapps/git/refs{/sha}","trees_url":"https://api.github.com/repos/wz1000/haskell-webapps/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wz1000/haskell-webapps/statuses/{sha}","languages_url":"https://api.github.com/repos/wz1000/haskell-webapps/languages","stargazers_url":"https://api.github.com/repos/wz1000/haskell-webapps/stargazers","contributors_url":"https://api.github.com/repos/wz1000/haskell-webapps/contributors","subscribers_url":"https://api.github.com/repos/wz1000/haskell-webapps/subscribers","subscription_url":"https://api.github.com/repos/wz1000/haskell-webapps/subscription","commits_url":"https://api.github.com/repos/wz1000/haskell-webapps/commits{/sha}","git_commits_url":"https://api.github.com/repos/wz1000/haskell-webapps/git/commits{/sha}","comments_url":"https://api.github.com/repos/wz1000/haskell-webapps/comments{/number}","issue_comment_url":"https://api.github.com/repos/wz1000/haskell-webapps/issues/comments{/number}","contents_url":"https://api.github.com/repos/wz1000/haskell-webapps/contents/{+path}","compare_url":"https://api.github.com/repos/wz1000/haskell-webapps/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wz1000/haskell-webapps/merges","archive_url":"https://api.github.com/repos/wz1000/haskell-webapps/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wz1000/haskell-webapps/downloads","issues_url":"https://api.github.com/repos/wz1000/haskell-webapps/issues{/number}","pulls_url":"https://api.github.com/repos/wz1000/haskell-webapps/pulls{/number}","milestones_url":"https://api.github.com/repos/wz1000/haskell-webapps/milestones{/number}","notifications_url":"https://api.github.com/repos/wz1000/haskell-webapps/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wz1000/haskell-webapps/labels{/name}","releases_url":"https://api.github.com/repos/wz1000/haskell-webapps/releases{/id}","deployments_url":"https://api.github.com/repos/wz1000/haskell-webapps/deployments","created_at":"2016-10-11T08:20:09Z","updated_at":"2016-10-11T08:20:11Z","pushed_at":"2016-10-24T09:34:36Z","git_url":"git://github.com/wz1000/haskell-webapps.git","ssh_url":"git@github.com:wz1000/haskell-webapps.git","clone_url":"https://github.com/wz1000/haskell-webapps.git","svn_url":"https://github.com/wz1000/haskell-webapps","homepage":null,"size":3506,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"vacationlabs:master","ref":"master","sha":"1845eedeb5a000a1054af382eca86c2e5048b0d9","user":{"login":"vacationlabs","id":1989733,"avatar_url":"https://avatars.githubusercontent.com/u/1989733?v=3","gravatar_id":"","url":"https://api.github.com/users/vacationlabs","html_url":"https://github.com/vacationlabs","followers_url":"https://api.github.com/users/vacationlabs/followers","following_url":"https://api.github.com/users/vacationlabs/following{/other_user}","gists_url":"https://api.github.com/users/vacationlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/vacationlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vacationlabs/subscriptions","organizations_url":"https://api.github.com/users/vacationlabs/orgs","repos_url":"https://api.github.com/users/vacationlabs/repos","events_url":"https://api.github.com/users/vacationlabs/events{/privacy}","received_events_url":"https://api.github.com/users/vacationlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":66148772,"name":"haskell-webapps","full_name":"vacationlabs/haskell-webapps","owner":{"login":"vacationlabs","id":1989733,"avatar_url":"https://avatars.githubusercontent.com/u/1989733?v=3","gravatar_id":"","url":"https://api.github.com/users/vacationlabs","html_url":"https://github.com/vacationlabs","followers_url":"https://api.github.com/users/vacationlabs/followers","following_url":"https://api.github.com/users/vacationlabs/following{/other_user}","gists_url":"https://api.github.com/users/vacationlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/vacationlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vacationlabs/subscriptions","organizations_url":"https://api.github.com/users/vacationlabs/orgs","repos_url":"https://api.github.com/users/vacationlabs/repos","events_url":"https://api.github.com/users/vacationlabs/events{/privacy}","received_events_url":"https://api.github.com/users/vacationlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vacationlabs/haskell-webapps","description":"Proof-of-concept code for a typical webapp implemented in various Haskell libraries/frameworks","fork":false,"url":"https://api.github.com/repos/vacationlabs/haskell-webapps","forks_url":"https://api.github.com/repos/vacationlabs/haskell-webapps/forks","keys_url":"https://api.github.com/repos/vacationlabs/haskell-webapps/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vacationlabs/haskell-webapps/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vacationlabs/haskell-webapps/teams","hooks_url":"https://api.github.com/repos/vacationlabs/haskell-webapps/hooks","issue_events_url":"https://api.github.com/repos/vacationlabs/haskell-webapps/issues/events{/number}","events_url":"https://api.github.com/repos/vacationlabs/haskell-webapps/events","assignees_url":"https://api.github.com/repos/vacationlabs/haskell-webapps/assignees{/user}","branches_url":"https://api.github.com/repos/vacationlabs/haskell-webapps/branches{/branch}","tags_url":"https://api.github.com/repos/vacationlabs/haskell-webapps/tags","blobs_url":"https://api.github.com/repos/vacationlabs/haskell-webapps/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vacationlabs/haskell-webapps/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vacationlabs/haskell-webapps/git/refs{/sha}","trees_url":"https://api.github.com/repos/vacationlabs/haskell-webapps/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vacationlabs/haskell-webapps/statuses/{sha}","languages_url":"https://api.github.com/repos/vacationlabs/haskell-webapps/languages","stargazers_url":"https://api.github.com/repos/vacationlabs/haskell-webapps/stargazers","contributors_url":"https://api.github.com/repos/vacationlabs/haskell-webapps/contributors","subscribers_url":"https://api.github.com/repos/vacationlabs/haskell-webapps/subscribers","subscription_url":"https://api.github.com/repos/vacationlabs/haskell-webapps/subscription","commits_url":"https://api.github.com/repos/vacationlabs/haskell-webapps/commits{/sha}","git_commits_url":"https://api.github.com/repos/vacationlabs/haskell-webapps/git/commits{/sha}","comments_url":"https://api.github.com/repos/vacationlabs/haskell-webapps/comments{/number}","issue_comment_url":"https://api.github.com/repos/vacationlabs/haskell-webapps/issues/comments{/number}","contents_url":"https://api.github.com/repos/vacationlabs/haskell-webapps/contents/{+path}","compare_url":"https://api.github.com/repos/vacationlabs/haskell-webapps/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vacationlabs/haskell-webapps/merges","archive_url":"https://api.github.com/repos/vacationlabs/haskell-webapps/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vacationlabs/haskell-webapps/downloads","issues_url":"https://api.github.com/repos/vacationlabs/haskell-webapps/issues{/number}","pulls_url":"https://api.github.com/repos/vacationlabs/haskell-webapps/pulls{/number}","milestones_url":"https://api.github.com/repos/vacationlabs/haskell-webapps/milestones{/number}","notifications_url":"https://api.github.com/repos/vacationlabs/haskell-webapps/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vacationlabs/haskell-webapps/labels{/name}","releases_url":"https://api.github.com/repos/vacationlabs/haskell-webapps/releases{/id}","deployments_url":"https://api.github.com/repos/vacationlabs/haskell-webapps/deployments","created_at":"2016-08-20T13:41:54Z","updated_at":"2016-10-24T04:20:45Z","pushed_at":"2016-10-25T12:29:37Z","git_url":"git://github.com/vacationlabs/haskell-webapps.git","ssh_url":"git@github.com:vacationlabs/haskell-webapps.git","clone_url":"https://github.com/vacationlabs/haskell-webapps.git","svn_url":"https://github.com/vacationlabs/haskell-webapps","homepage":null,"size":3905,"stargazers_count":37,"watchers_count":37,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":9,"mirror_url":null,"open_issues_count":28,"forks":9,"open_issues":28,"watchers":37,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vacationlabs/haskell-webapps/pulls/30"},"html":{"href":"https://github.com/vacationlabs/haskell-webapps/pull/30"},"issue":{"href":"https://api.github.com/repos/vacationlabs/haskell-webapps/issues/30"},"comments":{"href":"https://api.github.com/repos/vacationlabs/haskell-webapps/issues/30/comments"},"review_comments":{"href":"https://api.github.com/repos/vacationlabs/haskell-webapps/pulls/30/comments"},"review_comment":{"href":"https://api.github.com/repos/vacationlabs/haskell-webapps/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vacationlabs/haskell-webapps/pulls/30/commits"},"statuses":{"href":"https://api.github.com/repos/vacationlabs/haskell-webapps/statuses/96f848a591d851105671ac104525dcef55f64eea"}}}}
{"actor":{"display_login":"saurabhnanda"}}