{"action":"created","comment":{"url":"https://api.github.com/repos/gem/oq-platform2/pulls/comments/193399604","pull_request_review_id":126361961,"id":193399604,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MzM5OTYwNA==","diff_hunk":"@@ -0,0 +1,38 @@\n+from django.core.management.base import BaseCommand\n+from django.contrib.auth import get_user_model\n+from django.contrib.auth.models import Group\n+\n+class Command(BaseCommand):\n+\n+    def handle(*args, **options):\n+\n+        gem_username = 'GEM'\n+        gem_pwd = 'GEM'\n+        groupname = 'vulnerability-editors'\n+\n+        ## Create Gem user without password\n+        User = get_user_model()\n+        gem_user = User.objects.create_user(username=gem_username,\n+                                           email='info@globalquakemodel.org',\n+                                           first_name=gem_username,\n+                                           last_name='Foundation',\n+                                           organization='Gem Foundation',\n+                                           city='Pavia (PV)',\n+                                           voice='+3903825169865',\n+                                           zipcode='27100',\n+                                           country='ITA')\n+\n+        ## Set pwd for Gem user\n+        gem_user = User.objects.get(username=gem_username)\n+        gem_user.set_password(gem_pwd)\n+        gem_user.save()\n+\n+        ## Added Gen user in a group\n+        UserGroup = Group.objects.get(name=groupname)\n+        gem_user.groups.add(UserGroup)\n+\n+        ## Print if create Gem user is successfully \n+        if gem_user.first_name == gem_username:","path":"openquakeplatform/pla_common/management/commands/create_gem_user.py","position":35,"original_position":35,"commit_id":"d8381f9f4c29909af74a5679a82e3664f98ae389","original_commit_id":"d8381f9f4c29909af74a5679a82e3664f98ae389","user":{"login":"nastasi-oq","id":1670278,"node_id":"MDQ6VXNlcjE2NzAyNzg=","avatar_url":"https://avatars1.githubusercontent.com/u/1670278?v=4","gravatar_id":"","url":"https://api.github.com/users/nastasi-oq","html_url":"https://github.com/nastasi-oq","followers_url":"https://api.github.com/users/nastasi-oq/followers","following_url":"https://api.github.com/users/nastasi-oq/following{/other_user}","gists_url":"https://api.github.com/users/nastasi-oq/gists{/gist_id}","starred_url":"https://api.github.com/users/nastasi-oq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nastasi-oq/subscriptions","organizations_url":"https://api.github.com/users/nastasi-oq/orgs","repos_url":"https://api.github.com/users/nastasi-oq/repos","events_url":"https://api.github.com/users/nastasi-oq/events{/privacy}","received_events_url":"https://api.github.com/users/nastasi-oq/received_events","type":"User","site_admin":false},"body":"move this test just after ``create_user(...)`` method call.","created_at":"2018-06-06T12:58:52Z","updated_at":"2018-06-06T12:58:53Z","html_url":"https://github.com/gem/oq-platform2/pull/45#discussion_r193399604","pull_request_url":"https://api.github.com/repos/gem/oq-platform2/pulls/45","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/gem/oq-platform2/pulls/comments/193399604"},"html":{"href":"https://github.com/gem/oq-platform2/pull/45#discussion_r193399604"},"pull_request":{"href":"https://api.github.com/repos/gem/oq-platform2/pulls/45"}}},"pull_request":{"url":"https://api.github.com/repos/gem/oq-platform2/pulls/45","id":191778833,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkxNzc4ODMz","html_url":"https://github.com/gem/oq-platform2/pull/45","diff_url":"https://github.com/gem/oq-platform2/pull/45.diff","patch_url":"https://github.com/gem/oq-platform2/pull/45.patch","issue_url":"https://api.github.com/repos/gem/oq-platform2/issues/45","number":45,"state":"open","locked":false,"title":"User contributed","user":{"login":"hascar","id":22245939,"node_id":"MDQ6VXNlcjIyMjQ1OTM5","avatar_url":"https://avatars3.githubusercontent.com/u/22245939?v=4","gravatar_id":"","url":"https://api.github.com/users/hascar","html_url":"https://github.com/hascar","followers_url":"https://api.github.com/users/hascar/followers","following_url":"https://api.github.com/users/hascar/following{/other_user}","gists_url":"https://api.github.com/users/hascar/gists{/gist_id}","starred_url":"https://api.github.com/users/hascar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hascar/subscriptions","organizations_url":"https://api.github.com/users/hascar/orgs","repos_url":"https://api.github.com/users/hascar/repos","events_url":"https://api.github.com/users/hascar/events{/privacy}","received_events_url":"https://api.github.com/users/hascar/received_events","type":"User","site_admin":false},"body":"Added (user-contributed) into the Maps,Layers and Documents title when the user that insert this things is not \"GEM\"\r\nCreation Gem user\r\n\r\nThe tests are green here: https://ci.openquake.org/job/zdevel_oq-platform2/430/","created_at":"2018-05-31T14:49:36Z","updated_at":"2018-06-06T12:58:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0df227251e6de5a81922073246c81284d0580016","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/gem/oq-platform2/pulls/45/commits","review_comments_url":"https://api.github.com/repos/gem/oq-platform2/pulls/45/comments","review_comment_url":"https://api.github.com/repos/gem/oq-platform2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gem/oq-platform2/issues/45/comments","statuses_url":"https://api.github.com/repos/gem/oq-platform2/statuses/d8381f9f4c29909af74a5679a82e3664f98ae389","head":{"label":"gem:user-contributed","ref":"user-contributed","sha":"d8381f9f4c29909af74a5679a82e3664f98ae389","user":{"login":"gem","id":316546,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxNjU0Ng==","avatar_url":"https://avatars1.githubusercontent.com/u/316546?v=4","gravatar_id":"","url":"https://api.github.com/users/gem","html_url":"https://github.com/gem","followers_url":"https://api.github.com/users/gem/followers","following_url":"https://api.github.com/users/gem/following{/other_user}","gists_url":"https://api.github.com/users/gem/gists{/gist_id}","starred_url":"https://api.github.com/users/gem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gem/subscriptions","organizations_url":"https://api.github.com/users/gem/orgs","repos_url":"https://api.github.com/users/gem/repos","events_url":"https://api.github.com/users/gem/events{/privacy}","received_events_url":"https://api.github.com/users/gem/received_events","type":"Organization","site_admin":false},"repo":{"id":81067379,"node_id":"MDEwOlJlcG9zaXRvcnk4MTA2NzM3OQ==","name":"oq-platform2","full_name":"gem/oq-platform2","owner":{"login":"gem","id":316546,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxNjU0Ng==","avatar_url":"https://avatars1.githubusercontent.com/u/316546?v=4","gravatar_id":"","url":"https://api.github.com/users/gem","html_url":"https://github.com/gem","followers_url":"https://api.github.com/users/gem/followers","following_url":"https://api.github.com/users/gem/following{/other_user}","gists_url":"https://api.github.com/users/gem/gists{/gist_id}","starred_url":"https://api.github.com/users/gem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gem/subscriptions","organizations_url":"https://api.github.com/users/gem/orgs","repos_url":"https://api.github.com/users/gem/repos","events_url":"https://api.github.com/users/gem/events{/privacy}","received_events_url":"https://api.github.com/users/gem/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gem/oq-platform2","description":"The _new_ OpenQuake Platform","fork":false,"url":"https://api.github.com/repos/gem/oq-platform2","forks_url":"https://api.github.com/repos/gem/oq-platform2/forks","keys_url":"https://api.github.com/repos/gem/oq-platform2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gem/oq-platform2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gem/oq-platform2/teams","hooks_url":"https://api.github.com/repos/gem/oq-platform2/hooks","issue_events_url":"https://api.github.com/repos/gem/oq-platform2/issues/events{/number}","events_url":"https://api.github.com/repos/gem/oq-platform2/events","assignees_url":"https://api.github.com/repos/gem/oq-platform2/assignees{/user}","branches_url":"https://api.github.com/repos/gem/oq-platform2/branches{/branch}","tags_url":"https://api.github.com/repos/gem/oq-platform2/tags","blobs_url":"https://api.github.com/repos/gem/oq-platform2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gem/oq-platform2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gem/oq-platform2/git/refs{/sha}","trees_url":"https://api.github.com/repos/gem/oq-platform2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gem/oq-platform2/statuses/{sha}","languages_url":"https://api.github.com/repos/gem/oq-platform2/languages","stargazers_url":"https://api.github.com/repos/gem/oq-platform2/stargazers","contributors_url":"https://api.github.com/repos/gem/oq-platform2/contributors","subscribers_url":"https://api.github.com/repos/gem/oq-platform2/subscribers","subscription_url":"https://api.github.com/repos/gem/oq-platform2/subscription","commits_url":"https://api.github.com/repos/gem/oq-platform2/commits{/sha}","git_commits_url":"https://api.github.com/repos/gem/oq-platform2/git/commits{/sha}","comments_url":"https://api.github.com/repos/gem/oq-platform2/comments{/number}","issue_comment_url":"https://api.github.com/repos/gem/oq-platform2/issues/comments{/number}","contents_url":"https://api.github.com/repos/gem/oq-platform2/contents/{+path}","compare_url":"https://api.github.com/repos/gem/oq-platform2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gem/oq-platform2/merges","archive_url":"https://api.github.com/repos/gem/oq-platform2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gem/oq-platform2/downloads","issues_url":"https://api.github.com/repos/gem/oq-platform2/issues{/number}","pulls_url":"https://api.github.com/repos/gem/oq-platform2/pulls{/number}","milestones_url":"https://api.github.com/repos/gem/oq-platform2/milestones{/number}","notifications_url":"https://api.github.com/repos/gem/oq-platform2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gem/oq-platform2/labels{/name}","releases_url":"https://api.github.com/repos/gem/oq-platform2/releases{/id}","deployments_url":"https://api.github.com/repos/gem/oq-platform2/deployments","created_at":"2017-02-06T08:56:25Z","updated_at":"2018-05-30T12:53:56Z","pushed_at":"2018-06-06T08:24:55Z","git_url":"git://github.com/gem/oq-platform2.git","ssh_url":"git@github.com:gem/oq-platform2.git","clone_url":"https://github.com/gem/oq-platform2.git","svn_url":"https://github.com/gem/oq-platform2","homepage":"","size":28175,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":6,"watchers":1,"default_branch":"master"}},"base":{"label":"gem:master","ref":"master","sha":"77a40ae64eee14bbde2bffc75eff33989b16b39e","user":{"login":"gem","id":316546,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxNjU0Ng==","avatar_url":"https://avatars1.githubusercontent.com/u/316546?v=4","gravatar_id":"","url":"https://api.github.com/users/gem","html_url":"https://github.com/gem","followers_url":"https://api.github.com/users/gem/followers","following_url":"https://api.github.com/users/gem/following{/other_user}","gists_url":"https://api.github.com/users/gem/gists{/gist_id}","starred_url":"https://api.github.com/users/gem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gem/subscriptions","organizations_url":"https://api.github.com/users/gem/orgs","repos_url":"https://api.github.com/users/gem/repos","events_url":"https://api.github.com/users/gem/events{/privacy}","received_events_url":"https://api.github.com/users/gem/received_events","type":"Organization","site_admin":false},"repo":{"id":81067379,"node_id":"MDEwOlJlcG9zaXRvcnk4MTA2NzM3OQ==","name":"oq-platform2","full_name":"gem/oq-platform2","owner":{"login":"gem","id":316546,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxNjU0Ng==","avatar_url":"https://avatars1.githubusercontent.com/u/316546?v=4","gravatar_id":"","url":"https://api.github.com/users/gem","html_url":"https://github.com/gem","followers_url":"https://api.github.com/users/gem/followers","following_url":"https://api.github.com/users/gem/following{/other_user}","gists_url":"https://api.github.com/users/gem/gists{/gist_id}","starred_url":"https://api.github.com/users/gem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gem/subscriptions","organizations_url":"https://api.github.com/users/gem/orgs","repos_url":"https://api.github.com/users/gem/repos","events_url":"https://api.github.com/users/gem/events{/privacy}","received_events_url":"https://api.github.com/users/gem/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gem/oq-platform2","description":"The _new_ OpenQuake Platform","fork":false,"url":"https://api.github.com/repos/gem/oq-platform2","forks_url":"https://api.github.com/repos/gem/oq-platform2/forks","keys_url":"https://api.github.com/repos/gem/oq-platform2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gem/oq-platform2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gem/oq-platform2/teams","hooks_url":"https://api.github.com/repos/gem/oq-platform2/hooks","issue_events_url":"https://api.github.com/repos/gem/oq-platform2/issues/events{/number}","events_url":"https://api.github.com/repos/gem/oq-platform2/events","assignees_url":"https://api.github.com/repos/gem/oq-platform2/assignees{/user}","branches_url":"https://api.github.com/repos/gem/oq-platform2/branches{/branch}","tags_url":"https://api.github.com/repos/gem/oq-platform2/tags","blobs_url":"https://api.github.com/repos/gem/oq-platform2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gem/oq-platform2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gem/oq-platform2/git/refs{/sha}","trees_url":"https://api.github.com/repos/gem/oq-platform2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gem/oq-platform2/statuses/{sha}","languages_url":"https://api.github.com/repos/gem/oq-platform2/languages","stargazers_url":"https://api.github.com/repos/gem/oq-platform2/stargazers","contributors_url":"https://api.github.com/repos/gem/oq-platform2/contributors","subscribers_url":"https://api.github.com/repos/gem/oq-platform2/subscribers","subscription_url":"https://api.github.com/repos/gem/oq-platform2/subscription","commits_url":"https://api.github.com/repos/gem/oq-platform2/commits{/sha}","git_commits_url":"https://api.github.com/repos/gem/oq-platform2/git/commits{/sha}","comments_url":"https://api.github.com/repos/gem/oq-platform2/comments{/number}","issue_comment_url":"https://api.github.com/repos/gem/oq-platform2/issues/comments{/number}","contents_url":"https://api.github.com/repos/gem/oq-platform2/contents/{+path}","compare_url":"https://api.github.com/repos/gem/oq-platform2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gem/oq-platform2/merges","archive_url":"https://api.github.com/repos/gem/oq-platform2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gem/oq-platform2/downloads","issues_url":"https://api.github.com/repos/gem/oq-platform2/issues{/number}","pulls_url":"https://api.github.com/repos/gem/oq-platform2/pulls{/number}","milestones_url":"https://api.github.com/repos/gem/oq-platform2/milestones{/number}","notifications_url":"https://api.github.com/repos/gem/oq-platform2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gem/oq-platform2/labels{/name}","releases_url":"https://api.github.com/repos/gem/oq-platform2/releases{/id}","deployments_url":"https://api.github.com/repos/gem/oq-platform2/deployments","created_at":"2017-02-06T08:56:25Z","updated_at":"2018-05-30T12:53:56Z","pushed_at":"2018-06-06T08:24:55Z","git_url":"git://github.com/gem/oq-platform2.git","ssh_url":"git@github.com:gem/oq-platform2.git","clone_url":"https://github.com/gem/oq-platform2.git","svn_url":"https://github.com/gem/oq-platform2","homepage":"","size":28175,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":6,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gem/oq-platform2/pulls/45"},"html":{"href":"https://github.com/gem/oq-platform2/pull/45"},"issue":{"href":"https://api.github.com/repos/gem/oq-platform2/issues/45"},"comments":{"href":"https://api.github.com/repos/gem/oq-platform2/issues/45/comments"},"review_comments":{"href":"https://api.github.com/repos/gem/oq-platform2/pulls/45/comments"},"review_comment":{"href":"https://api.github.com/repos/gem/oq-platform2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gem/oq-platform2/pulls/45/commits"},"statuses":{"href":"https://api.github.com/repos/gem/oq-platform2/statuses/d8381f9f4c29909af74a5679a82e3664f98ae389"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"nastasi-oq"}}