{"action":"created","comment":{"url":"https://api.github.com/repos/librecores/librecores-web/pulls/comments/98349859","pull_request_review_id":18989692,"id":98349859,"diff_hunk":"@@ -1,8 +1,8 @@\n -- sample data for development of the LibreCores web site\n \n-INSERT INTO `Organization` (`id`, `name`, `displayName`, `description`, `ownerId`) VALUES\n-(1, 'unassigned', 'Unassigned', 'Unassigned description', NULL),\n-(2, 'openrisc', 'OpenRISC', 'OpenRISC Description', NULL);\n+INSERT INTO `Organization` (`id`, `name`, `displayName`, `description`, `creatorId`, `createdAt`, `updatedAt`) VALUES\n+(1, 'unassigned', 'Unassigned', 'Unassigned description', NULL, NULL, NULL),\n+(2, 'openrisc', 'OpenRISC', 'OpenRISC Description', NULL, NULL, NULL);","path":"sql/dev_fixtures_site.sql","position":8,"original_position":8,"commit_id":"b5910a25e6faaf66a6ac7b5b22de3fab9218df8d","original_commit_id":"b5910a25e6faaf66a6ac7b5b22de3fab9218df8d","user":{"login":"imphil","id":1467123,"avatar_url":"https://avatars.githubusercontent.com/u/1467123?v=3","gravatar_id":"","url":"https://api.github.com/users/imphil","html_url":"https://github.com/imphil","followers_url":"https://api.github.com/users/imphil/followers","following_url":"https://api.github.com/users/imphil/following{/other_user}","gists_url":"https://api.github.com/users/imphil/gists{/gist_id}","starred_url":"https://api.github.com/users/imphil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imphil/subscriptions","organizations_url":"https://api.github.com/users/imphil/orgs","repos_url":"https://api.github.com/users/imphil/repos","events_url":"https://api.github.com/users/imphil/events{/privacy}","received_events_url":"https://api.github.com/users/imphil/received_events","type":"User","site_admin":false},"body":"If you make this not-null above, this also nees to change (until we have proper fixtures some day) :)","created_at":"2017-01-29T10:42:38Z","updated_at":"2017-01-29T10:50:25Z","html_url":"https://github.com/librecores/librecores-web/pull/101#discussion_r98349859","pull_request_url":"https://api.github.com/repos/librecores/librecores-web/pulls/101","_links":{"self":{"href":"https://api.github.com/repos/librecores/librecores-web/pulls/comments/98349859"},"html":{"href":"https://github.com/librecores/librecores-web/pull/101#discussion_r98349859"},"pull_request":{"href":"https://api.github.com/repos/librecores/librecores-web/pulls/101"}}},"pull_request":{"url":"https://api.github.com/repos/librecores/librecores-web/pulls/101","id":103634750,"html_url":"https://github.com/librecores/librecores-web/pull/101","diff_url":"https://github.com/librecores/librecores-web/pull/101.diff","patch_url":"https://github.com/librecores/librecores-web/pull/101.patch","issue_url":"https://api.github.com/repos/librecores/librecores-web/issues/101","number":101,"state":"open","locked":false,"title":"Organizations","user":{"login":"eliaskousk","id":801988,"avatar_url":"https://avatars.githubusercontent.com/u/801988?v=3","gravatar_id":"","url":"https://api.github.com/users/eliaskousk","html_url":"https://github.com/eliaskousk","followers_url":"https://api.github.com/users/eliaskousk/followers","following_url":"https://api.github.com/users/eliaskousk/following{/other_user}","gists_url":"https://api.github.com/users/eliaskousk/gists{/gist_id}","starred_url":"https://api.github.com/users/eliaskousk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eliaskousk/subscriptions","organizations_url":"https://api.github.com/users/eliaskousk/orgs","repos_url":"https://api.github.com/users/eliaskousk/repos","events_url":"https://api.github.com/users/eliaskousk/events{/privacy}","received_events_url":"https://api.github.com/users/eliaskousk/received_events","type":"User","site_admin":false},"body":"The work on organizations is mostly complete and supports the following:\r\n\r\n- Create an org\r\n- Edit an org\r\n- Remove an org\r\n- Add a project under an org (at last!!!)\r\n- Edit a project under an org\r\n- Join an org that a user is not already a member or denied previously\r\n- Any member of the org can approve or deny a request to join the org\r\n- View an org and it's projects, members, settings, join requests, etc.\r\n- View the orgs a user belongs or requested to join in his profile\r\n- View the orgs a user belongs or requested to join in a separate page for this purpose\r\n\r\nEach organization entity (`Organization`) is tied to a user (`User`) via a mapping called `OrganizationMembers`. This mapping besides the foreign keys holds permissions and other meta-data that we want to store there. Currently besides permissions only timestamps are stored but this may change in the future.\r\n\r\nRoles / permissions are quite flexible in this setup and we currently support the following roles:\r\n\r\n* **REQUEST** - The user has requested to join the org\r\n\r\n* **DENY** - The user was denied joining the org\r\n\r\n* **SUPPORT** - The user supports / follows the org but he is not a member. Currently not used, but I thought we might want to allow user to follow projects, news etc. on orgs without officially being a member, like a user can 'star' projects. Ideas on this are welcome!\r\n\r\n* **MEMBER** - The user is a member of the org and has full control of it, e.g approving new members, removing other members, editing settings etc.\r\n\r\n* **ADMIN**  - The user is an admin of the org. Currently set only for the user who created the org. I added this role in-case we want to allow a member super-special privileges like deleting the org and all projects.\r\n\r\nEach role can be extended in the future with fine-grained permissions that are stored in a separate entity e.g `OrganizationPermissions` and associated from the current `permissions` property, thus requiring minimal changes. For now though I think the above 5 roles are more than enough.\r\n\r\nLastly the `Organization` entity still contains the original `creator` of the org as a property. We don't use this anywhere and it's only there for logging / history purposes. This creator as of the latest commits doesn't have any special power that the other members do not. We can remove this property without any consequences but I think we should keep it as it does no harm.\r\n\r\nMore discussion on the rationale of the above decisions can be found in the main issue #7.","created_at":"2017-01-29T04:17:39Z","updated_at":"2017-01-29T10:50:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"393fcd46124397b858413e0db2f6f317570701cd","assignee":{"login":"eliaskousk","id":801988,"avatar_url":"https://avatars.githubusercontent.com/u/801988?v=3","gravatar_id":"","url":"https://api.github.com/users/eliaskousk","html_url":"https://github.com/eliaskousk","followers_url":"https://api.github.com/users/eliaskousk/followers","following_url":"https://api.github.com/users/eliaskousk/following{/other_user}","gists_url":"https://api.github.com/users/eliaskousk/gists{/gist_id}","starred_url":"https://api.github.com/users/eliaskousk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eliaskousk/subscriptions","organizations_url":"https://api.github.com/users/eliaskousk/orgs","repos_url":"https://api.github.com/users/eliaskousk/repos","events_url":"https://api.github.com/users/eliaskousk/events{/privacy}","received_events_url":"https://api.github.com/users/eliaskousk/received_events","type":"User","site_admin":false},"assignees":[{"login":"eliaskousk","id":801988,"avatar_url":"https://avatars.githubusercontent.com/u/801988?v=3","gravatar_id":"","url":"https://api.github.com/users/eliaskousk","html_url":"https://github.com/eliaskousk","followers_url":"https://api.github.com/users/eliaskousk/followers","following_url":"https://api.github.com/users/eliaskousk/following{/other_user}","gists_url":"https://api.github.com/users/eliaskousk/gists{/gist_id}","starred_url":"https://api.github.com/users/eliaskousk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eliaskousk/subscriptions","organizations_url":"https://api.github.com/users/eliaskousk/orgs","repos_url":"https://api.github.com/users/eliaskousk/repos","events_url":"https://api.github.com/users/eliaskousk/events{/privacy}","received_events_url":"https://api.github.com/users/eliaskousk/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/librecores/librecores-web/pulls/101/commits","review_comments_url":"https://api.github.com/repos/librecores/librecores-web/pulls/101/comments","review_comment_url":"https://api.github.com/repos/librecores/librecores-web/pulls/comments{/number}","comments_url":"https://api.github.com/repos/librecores/librecores-web/issues/101/comments","statuses_url":"https://api.github.com/repos/librecores/librecores-web/statuses/b5910a25e6faaf66a6ac7b5b22de3fab9218df8d","head":{"label":"eliaskousk:organizations","ref":"organizations","sha":"b5910a25e6faaf66a6ac7b5b22de3fab9218df8d","user":{"login":"eliaskousk","id":801988,"avatar_url":"https://avatars.githubusercontent.com/u/801988?v=3","gravatar_id":"","url":"https://api.github.com/users/eliaskousk","html_url":"https://github.com/eliaskousk","followers_url":"https://api.github.com/users/eliaskousk/followers","following_url":"https://api.github.com/users/eliaskousk/following{/other_user}","gists_url":"https://api.github.com/users/eliaskousk/gists{/gist_id}","starred_url":"https://api.github.com/users/eliaskousk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eliaskousk/subscriptions","organizations_url":"https://api.github.com/users/eliaskousk/orgs","repos_url":"https://api.github.com/users/eliaskousk/repos","events_url":"https://api.github.com/users/eliaskousk/events{/privacy}","received_events_url":"https://api.github.com/users/eliaskousk/received_events","type":"User","site_admin":false},"repo":{"id":70044365,"name":"librecores-web","full_name":"eliaskousk/librecores-web","owner":{"login":"eliaskousk","id":801988,"avatar_url":"https://avatars.githubusercontent.com/u/801988?v=3","gravatar_id":"","url":"https://api.github.com/users/eliaskousk","html_url":"https://github.com/eliaskousk","followers_url":"https://api.github.com/users/eliaskousk/followers","following_url":"https://api.github.com/users/eliaskousk/following{/other_user}","gists_url":"https://api.github.com/users/eliaskousk/gists{/gist_id}","starred_url":"https://api.github.com/users/eliaskousk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eliaskousk/subscriptions","organizations_url":"https://api.github.com/users/eliaskousk/orgs","repos_url":"https://api.github.com/users/eliaskousk/repos","events_url":"https://api.github.com/users/eliaskousk/events{/privacy}","received_events_url":"https://api.github.com/users/eliaskousk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/eliaskousk/librecores-web","description":"LibreCores Web Site","fork":true,"url":"https://api.github.com/repos/eliaskousk/librecores-web","forks_url":"https://api.github.com/repos/eliaskousk/librecores-web/forks","keys_url":"https://api.github.com/repos/eliaskousk/librecores-web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eliaskousk/librecores-web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eliaskousk/librecores-web/teams","hooks_url":"https://api.github.com/repos/eliaskousk/librecores-web/hooks","issue_events_url":"https://api.github.com/repos/eliaskousk/librecores-web/issues/events{/number}","events_url":"https://api.github.com/repos/eliaskousk/librecores-web/events","assignees_url":"https://api.github.com/repos/eliaskousk/librecores-web/assignees{/user}","branches_url":"https://api.github.com/repos/eliaskousk/librecores-web/branches{/branch}","tags_url":"https://api.github.com/repos/eliaskousk/librecores-web/tags","blobs_url":"https://api.github.com/repos/eliaskousk/librecores-web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eliaskousk/librecores-web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eliaskousk/librecores-web/git/refs{/sha}","trees_url":"https://api.github.com/repos/eliaskousk/librecores-web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eliaskousk/librecores-web/statuses/{sha}","languages_url":"https://api.github.com/repos/eliaskousk/librecores-web/languages","stargazers_url":"https://api.github.com/repos/eliaskousk/librecores-web/stargazers","contributors_url":"https://api.github.com/repos/eliaskousk/librecores-web/contributors","subscribers_url":"https://api.github.com/repos/eliaskousk/librecores-web/subscribers","subscription_url":"https://api.github.com/repos/eliaskousk/librecores-web/subscription","commits_url":"https://api.github.com/repos/eliaskousk/librecores-web/commits{/sha}","git_commits_url":"https://api.github.com/repos/eliaskousk/librecores-web/git/commits{/sha}","comments_url":"https://api.github.com/repos/eliaskousk/librecores-web/comments{/number}","issue_comment_url":"https://api.github.com/repos/eliaskousk/librecores-web/issues/comments{/number}","contents_url":"https://api.github.com/repos/eliaskousk/librecores-web/contents/{+path}","compare_url":"https://api.github.com/repos/eliaskousk/librecores-web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eliaskousk/librecores-web/merges","archive_url":"https://api.github.com/repos/eliaskousk/librecores-web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eliaskousk/librecores-web/downloads","issues_url":"https://api.github.com/repos/eliaskousk/librecores-web/issues{/number}","pulls_url":"https://api.github.com/repos/eliaskousk/librecores-web/pulls{/number}","milestones_url":"https://api.github.com/repos/eliaskousk/librecores-web/milestones{/number}","notifications_url":"https://api.github.com/repos/eliaskousk/librecores-web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eliaskousk/librecores-web/labels{/name}","releases_url":"https://api.github.com/repos/eliaskousk/librecores-web/releases{/id}","deployments_url":"https://api.github.com/repos/eliaskousk/librecores-web/deployments","created_at":"2016-10-05T08:58:11Z","updated_at":"2016-10-05T08:58:15Z","pushed_at":"2017-01-29T04:14:13Z","git_url":"git://github.com/eliaskousk/librecores-web.git","ssh_url":"git@github.com:eliaskousk/librecores-web.git","clone_url":"https://github.com/eliaskousk/librecores-web.git","svn_url":"https://github.com/eliaskousk/librecores-web","homepage":"http://librecores.org/","size":8316,"stargazers_count":0,"watchers_count":0,"language":"PHP","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":"librecores:master","ref":"master","sha":"8bca796adf113daa5a31003df2579a158e68b687","user":{"login":"librecores","id":10119298,"avatar_url":"https://avatars.githubusercontent.com/u/10119298?v=3","gravatar_id":"","url":"https://api.github.com/users/librecores","html_url":"https://github.com/librecores","followers_url":"https://api.github.com/users/librecores/followers","following_url":"https://api.github.com/users/librecores/following{/other_user}","gists_url":"https://api.github.com/users/librecores/gists{/gist_id}","starred_url":"https://api.github.com/users/librecores/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/librecores/subscriptions","organizations_url":"https://api.github.com/users/librecores/orgs","repos_url":"https://api.github.com/users/librecores/repos","events_url":"https://api.github.com/users/librecores/events{/privacy}","received_events_url":"https://api.github.com/users/librecores/received_events","type":"Organization","site_admin":false},"repo":{"id":31414037,"name":"librecores-web","full_name":"librecores/librecores-web","owner":{"login":"librecores","id":10119298,"avatar_url":"https://avatars.githubusercontent.com/u/10119298?v=3","gravatar_id":"","url":"https://api.github.com/users/librecores","html_url":"https://github.com/librecores","followers_url":"https://api.github.com/users/librecores/followers","following_url":"https://api.github.com/users/librecores/following{/other_user}","gists_url":"https://api.github.com/users/librecores/gists{/gist_id}","starred_url":"https://api.github.com/users/librecores/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/librecores/subscriptions","organizations_url":"https://api.github.com/users/librecores/orgs","repos_url":"https://api.github.com/users/librecores/repos","events_url":"https://api.github.com/users/librecores/events{/privacy}","received_events_url":"https://api.github.com/users/librecores/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/librecores/librecores-web","description":"LibreCores Web Site","fork":false,"url":"https://api.github.com/repos/librecores/librecores-web","forks_url":"https://api.github.com/repos/librecores/librecores-web/forks","keys_url":"https://api.github.com/repos/librecores/librecores-web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/librecores/librecores-web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/librecores/librecores-web/teams","hooks_url":"https://api.github.com/repos/librecores/librecores-web/hooks","issue_events_url":"https://api.github.com/repos/librecores/librecores-web/issues/events{/number}","events_url":"https://api.github.com/repos/librecores/librecores-web/events","assignees_url":"https://api.github.com/repos/librecores/librecores-web/assignees{/user}","branches_url":"https://api.github.com/repos/librecores/librecores-web/branches{/branch}","tags_url":"https://api.github.com/repos/librecores/librecores-web/tags","blobs_url":"https://api.github.com/repos/librecores/librecores-web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/librecores/librecores-web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/librecores/librecores-web/git/refs{/sha}","trees_url":"https://api.github.com/repos/librecores/librecores-web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/librecores/librecores-web/statuses/{sha}","languages_url":"https://api.github.com/repos/librecores/librecores-web/languages","stargazers_url":"https://api.github.com/repos/librecores/librecores-web/stargazers","contributors_url":"https://api.github.com/repos/librecores/librecores-web/contributors","subscribers_url":"https://api.github.com/repos/librecores/librecores-web/subscribers","subscription_url":"https://api.github.com/repos/librecores/librecores-web/subscription","commits_url":"https://api.github.com/repos/librecores/librecores-web/commits{/sha}","git_commits_url":"https://api.github.com/repos/librecores/librecores-web/git/commits{/sha}","comments_url":"https://api.github.com/repos/librecores/librecores-web/comments{/number}","issue_comment_url":"https://api.github.com/repos/librecores/librecores-web/issues/comments{/number}","contents_url":"https://api.github.com/repos/librecores/librecores-web/contents/{+path}","compare_url":"https://api.github.com/repos/librecores/librecores-web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/librecores/librecores-web/merges","archive_url":"https://api.github.com/repos/librecores/librecores-web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/librecores/librecores-web/downloads","issues_url":"https://api.github.com/repos/librecores/librecores-web/issues{/number}","pulls_url":"https://api.github.com/repos/librecores/librecores-web/pulls{/number}","milestones_url":"https://api.github.com/repos/librecores/librecores-web/milestones{/number}","notifications_url":"https://api.github.com/repos/librecores/librecores-web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/librecores/librecores-web/labels{/name}","releases_url":"https://api.github.com/repos/librecores/librecores-web/releases{/id}","deployments_url":"https://api.github.com/repos/librecores/librecores-web/deployments","created_at":"2015-02-27T10:16:23Z","updated_at":"2016-12-30T03:16:58Z","pushed_at":"2017-01-29T09:37:00Z","git_url":"git://github.com/librecores/librecores-web.git","ssh_url":"git@github.com:librecores/librecores-web.git","clone_url":"https://github.com/librecores/librecores-web.git","svn_url":"https://github.com/librecores/librecores-web","homepage":"https://www.librecores.org/","size":8287,"stargazers_count":5,"watchers_count":5,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":43,"forks":4,"open_issues":43,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/librecores/librecores-web/pulls/101"},"html":{"href":"https://github.com/librecores/librecores-web/pull/101"},"issue":{"href":"https://api.github.com/repos/librecores/librecores-web/issues/101"},"comments":{"href":"https://api.github.com/repos/librecores/librecores-web/issues/101/comments"},"review_comments":{"href":"https://api.github.com/repos/librecores/librecores-web/pulls/101/comments"},"review_comment":{"href":"https://api.github.com/repos/librecores/librecores-web/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/librecores/librecores-web/pulls/101/commits"},"statuses":{"href":"https://api.github.com/repos/librecores/librecores-web/statuses/b5910a25e6faaf66a6ac7b5b22de3fab9218df8d"}}}}
{"actor":{"display_login":"imphil"}}