{"action":"created","comment":{"url":"https://api.github.com/repos/hydroshare/hydroshare/pulls/comments/54784800","id":54784800,"diff_hunk":"@@ -0,0 +1,853 @@\n+import unittest\n+\n+from django.contrib.auth.models import Group, AnonymousUser\n+from django.test import TestCase, RequestFactory\n+from rest_framework.exceptions import PermissionDenied, NotFound\n+\n+from hs_core.hydroshare import resource\n+from hs_core.hydroshare import users\n+from hs_core.testing import MockIRODSTestCaseMixin\n+from hs_core.views.utils import authorize, Action_To_Authorize\n+from hs_access_control.models import PrivilegeCodes\n+\n+class TestAuthorize(MockIRODSTestCaseMixin, TestCase):\n+\n+    def setUp(self):\n+        super(TestAuthorize, self).setUp()\n+        self.group, _ = Group.objects.get_or_create(name='Hydroshare Author')\n+        # create a user - resource owner\n+        self.user = users.create_account(\n+            'test_user@email.com',\n+            username='testuser',\n+            first_name='some_first_name',\n+            last_name='some_last_name',\n+            superuser=False,\n+            groups=[])\n+        self.res = resource.create_resource(\n+            'GenericResource',\n+            self.user,\n+            'My Test Resource'\n+            )\n+\n+        self.request = RequestFactory().request()\n+\n+    def test_authorize_owner(self):\n+        common_parameters = [\n+                      # resource owner has authorization for resource metadata view\n+                      {'res_id': self.res.short_id, 'needed_permission': Action_To_Authorize.VIEW_METADATA,\n+                       'success': True, 'exception': None},\n+                      # resource owner has authorization for resource view (metadata and content files)\n+                      {'res_id': self.res.short_id, 'needed_permission': Action_To_Authorize.VIEW_RESOURCE,\n+                       'success': True, 'exception': None},\n+                      # resource owner has authorization for creating a new resource version\n+                      {'res_id': self.res.short_id, 'needed_permission': Action_To_Authorize.CREATE_RESOURCE_VERSION,\n+                       'success': True, 'exception': None}\n+                      ]\n+\n+        parameters = [\n+                      # resource owner has authorization for resource edit (metadata and content files)\n+                      {'res_id': self.res.short_id, 'needed_permission': Action_To_Authorize.EDIT_RESOURCE,\n+                       'success': True, 'exception': None},\n+                      # resource owner has authorization for setting resource flags\n+                      # (public, published/immutable, shareable etc)\n+                      {'res_id': self.res.short_id, 'needed_permission': Action_To_Authorize.SET_RESOURCE_FLAG,\n+                       'success': True, 'exception': None},\n+                      # resource owner has authorization for resource delete\n+                      {'res_id': self.res.short_id, 'needed_permission': Action_To_Authorize.DELETE_RESOURCE,\n+                       'success': True, 'exception': None}\n+                      ] + common_parameters\n+\n+        self.request.user = self.user\n+\n+        # test for private resource\n+        self.assertFalse(self.res.raccess.public)\n+        self.assertFalse(self.res.raccess.discoverable)\n+\n+        self._run_tests(self.request, parameters)\n+\n+        # test for discoverable resource\n+        self.assertFalse(self.res.raccess.discoverable)\n+        self.assertFalse(self.res.raccess.public)\n+        self.res.raccess.discoverable = True\n+        self.res.raccess.save()\n+\n+        self._run_tests(self.request, parameters)\n+\n+        # test for public resource\n+        self.assertTrue(self.res.raccess.discoverable)\n+        self.assertFalse(self.res.raccess.public)\n+        self.res.raccess.discoverable = False\n+        self.res.raccess.public = True\n+        self.res.raccess.save()\n+\n+        self._run_tests(self.request, parameters)\n+\n+        # test for immutable/published resource\n+        self.assertFalse(self.res.raccess.immutable)\n+        self.assertFalse(self.res.raccess.published)\n+        self.assertTrue(self.res.raccess.public)\n+\n+        self.res.raccess.published = True\n+        self.res.raccess.immutable = True\n+        self.res.raccess.save()\n+\n+        parameters = [\n+                      # resource owner has no authorization for editing a published resource\n+                      {'res_id': self.res.short_id, 'needed_permission': Action_To_Authorize.EDIT_RESOURCE,\n+                       'success': False, 'exception': PermissionDenied},\n+                      # resource owner has no authorization for setting resource\n+                      # flags (public, immutable/published, shareable etc)\n+                      {'res_id': self.res.short_id, 'needed_permission': Action_To_Authorize.SET_RESOURCE_FLAG,\n+                       'success': False, 'exception': PermissionDenied},\n+                      # resource owner has no authorization for deleting a published resource\n+                      {'res_id': self.res.short_id, 'needed_permission': Action_To_Authorize.DELETE_RESOURCE,\n+                       'success': False, 'exception': PermissionDenied}\n+                      ] + common_parameters\n+\n+        self._run_tests(self.request, parameters)\n+\n+    def test_authorize_editor(self):\n+        # create edit_user\n+        edit_user = users.create_account(\n+                'edit_user@email.com',\n+                username='edituser',\n+                first_name='edit_first_name',\n+                last_name='edit_last_name',\n+                superuser=False,\n+                groups=[])\n+\n+        self.request.user = edit_user\n+\n+        common_parameters = [\n+                      # resource editor has authorization for resource view (metadata and content files)\n+                      {'res_id': self.res.short_id, 'needed_permission': Action_To_Authorize.VIEW_RESOURCE,\n+                       'success': True, 'exception': None},\n+                      # resource editor has authorization for resource metadata view\n+                      {'res_id': self.res.short_id, 'needed_permission': Action_To_Authorize.VIEW_METADATA,\n+                       'success': True, 'exception': None},\n+                      # resource editor has no authorization for changing resource flags\n+                      # (e.g., public, published/immutable, shareable etc)\n+                      {'res_id': self.res.short_id, 'needed_permission': Action_To_Authorize.SET_RESOURCE_FLAG,\n+                       'success': False, 'exception': PermissionDenied},\n+                      # resource editor has no authorization for deleting a resource\n+                      {'res_id': self.res.short_id, 'needed_permission': Action_To_Authorize.DELETE_RESOURCE,\n+                       'success': False, 'exception': PermissionDenied},\n+                      # resource editor has no authorization for creating version of a resource\n+                      {'res_id': self.res.short_id, 'needed_permission': Action_To_Authorize.CREATE_RESOURCE_VERSION,\n+                       'success': False, 'exception': PermissionDenied}\n+                      ]\n+\n+        parameters = [\n+                      # resource editor has authorization for resource edit (metadata and content files)\n+                      {'res_id': self.res.short_id, 'needed_permission': Action_To_Authorize.EDIT_RESOURCE,\n+                       'success': True, 'exception': None}\n+                      ] + common_parameters\n+\n+        # grant edit_user edit permission\n+        self.user.uaccess.share_resource_with_user(self.res, edit_user, PrivilegeCodes.CHANGE)\n+\n+        # test for private resource\n+        self.assertFalse(self.res.raccess.public)\n+        self.assertFalse(self.res.raccess.discoverable)\n+\n+        self._run_tests(self.request, parameters)\n+\n+        # test for discoverable resource\n+        self.assertFalse(self.res.raccess.discoverable)\n+        self.assertFalse(self.res.raccess.public)\n+        self.res.raccess.discoverable = True\n+        self.res.raccess.save()\n+\n+        self._run_tests(self.request, parameters)\n+\n+        # test for public resource\n+        self.assertTrue(self.res.raccess.discoverable)\n+        self.assertFalse(self.res.raccess.public)\n+        self.res.raccess.discoverable = False\n+        self.res.raccess.public = True\n+        self.res.raccess.save()\n+\n+        self._run_tests(self.request, parameters)\n+\n+        # test for immutable/published resource\n+        self.assertFalse(self.res.raccess.immutable)\n+        self.assertFalse(self.res.raccess.published)\n+        self.assertTrue(self.res.raccess.public)\n+\n+        self.res.raccess.immutable = True\n+        self.res.raccess.published = True\n+        self.res.raccess.save()\n+\n+        parameters = [\n+                      # resource editor has no authorization for editing a published resource\n+                      {'res_id': self.res.short_id, 'needed_permission': Action_To_Authorize.EDIT_RESOURCE,\n+                       'success': False, 'exception': PermissionDenied}\n+                      ] + common_parameters\n+\n+        self._run_tests(self.request, parameters)\n+\n+    def test_authorize_viewer(self):\n+        # create view_user\n+        view_user = users.create_account(\n+            'view_user@email.com',\n+            username='viewuser',\n+            first_name='view_first_name',\n+            last_name='view_last_name',\n+            superuser=False,\n+            groups=[])\n+\n+        self.request.user = view_user\n+\n+        parameters = [\n+                      # resource viewer has authorization for resource metadata view\n+                      {'res_id': self.res.short_id, 'needed_permission': Action_To_Authorize.VIEW_METADATA,\n+                       'success': True, 'exception': None},\n+                      # resource viewer has authorization for resource view (metadata and content files)\n+                      {'res_id': self.res.short_id, 'needed_permission': Action_To_Authorize.VIEW_RESOURCE,\n+                       'success': True, 'exception': None},\n+                      # resource viewer has no authorization for editing a resource\n+                      {'res_id': self.res.short_id, 'needed_permission': Action_To_Authorize.EDIT_RESOURCE,\n+                       'success': False, 'exception': PermissionDenied},\n+                      # resource viewer has no authorization for changing resource flags\n+                      # (e.g., public, published/immutable, shareable etc)\n+                      {'res_id': self.res.short_id, 'needed_permission': Action_To_Authorize.SET_RESOURCE_FLAG,\n+                       'success': False, 'exception': PermissionDenied},\n+                      # resource viewer has no authorization for deleting a resource\n+                      {'res_id': self.res.short_id, 'needed_permission': Action_To_Authorize.DELETE_RESOURCE,\n+                       'success': False, 'exception': PermissionDenied},\n+                      # resource viewer has no authorization for creating a resource version\n+                      {'res_id': self.res.short_id, 'needed_permission': Action_To_Authorize.CREATE_RESOURCE_VERSION,\n+                       'success': False, 'exception': PermissionDenied}\n+                      ]\n+\n+        # grant view_user view permission\n+        self.user.uaccess.share_resource_with_user(self.res, view_user, PrivilegeCodes.VIEW)\n+\n+        # test for private resource\n+        self.assertFalse(self.res.raccess.public)\n+        self.assertFalse(self.res.raccess.discoverable)\n+\n+        self._run_tests(self.request, parameters)\n+\n+        # test for discoverable resource\n+        self.assertFalse(self.res.raccess.discoverable)\n+        self.assertFalse(self.res.raccess.public)\n+        self.res.raccess.discoverable = True\n+        self.res.raccess.save()\n+\n+        self._run_tests(self.request, parameters)\n+\n+        # test for public resource\n+        self.assertTrue(self.res.raccess.discoverable)\n+        self.assertFalse(self.res.raccess.public)\n+        self.res.raccess.discoverable = False\n+        self.res.raccess.public = True\n+        self.res.raccess.save()\n+\n+        self._run_tests(self.request, parameters)\n+\n+        # test for immutable/published resource\n+        self.assertFalse(self.res.raccess.immutable)\n+        self.assertFalse(self.res.raccess.published)\n+        self.assertTrue(self.res.raccess.public)\n+\n+        self.res.raccess.immutable = True\n+        self.res.raccess.published = True\n+        self.res.raccess.save()\n+\n+        self._run_tests(self.request, parameters)\n+\n+    def test_authorize_superuser(self):\n+        # create super user\n+        super_user = users.create_account(\n+            'super_user@email.com',\n+            username='superuser',\n+            first_name='super_first_name',\n+            last_name='super_last_name',\n+            superuser=True,\n+            groups=[])\n+\n+        self.request.user = super_user\n+\n+        common_parameters = [\n+                      # super user has authorization for resource metadata view for a resource\n+                      # that is private or discoverable or public or published\n+                      {'res_id': self.res.short_id, 'needed_permission': Action_To_Authorize.VIEW_METADATA,\n+                       'success': True, 'exception': None},\n+                      # super user has authorization for resource view (both metadata and content files)for a resource\n+                      # that is private or discoverable or public or published\n+                      {'res_id': self.res.short_id, 'needed_permission': Action_To_Authorize.VIEW_RESOURCE,\n+                       'success': True, 'exception': None},\n+                      # super user has authorization for editing a resource that is private or discoverable or public\n+                      # or published\n+                      {'res_id': self.res.short_id, 'needed_permission': Action_To_Authorize.EDIT_RESOURCE,\n+                       'success': True, 'exception': None},\n+                      # super user has no authorization for creating a resource version\n+                      {'res_id': self.res.short_id, 'needed_permission': Action_To_Authorize.CREATE_RESOURCE_VERSION,\n+                       'success': False, 'exception': PermissionDenied}\n+                      ]\n+\n+        parameters = [\n+                      # super user has authorization for setting resource flags (e.g., public,\n+                      # published/immutable, shareable etc) for a private resource\n+                      {'res_id': self.res.short_id, 'needed_permission': Action_To_Authorize.SET_RESOURCE_FLAG,\n+                       'success': True, 'exception': None},\n+                      # super user has authorization for deleting a private resource","path":"hs_core/tests/api/views/test_authorize.py","position":295,"original_position":295,"commit_id":"a458c8d7d504854dd1f0755ba11092ff5c516e6b","original_commit_id":"a458c8d7d504854dd1f0755ba11092ff5c516e6b","user":{"login":"dtarb","id":3456833,"avatar_url":"https://avatars.githubusercontent.com/u/3456833?v=3","gravatar_id":"","url":"https://api.github.com/users/dtarb","html_url":"https://github.com/dtarb","followers_url":"https://api.github.com/users/dtarb/followers","following_url":"https://api.github.com/users/dtarb/following{/other_user}","gists_url":"https://api.github.com/users/dtarb/gists{/gist_id}","starred_url":"https://api.github.com/users/dtarb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dtarb/subscriptions","organizations_url":"https://api.github.com/users/dtarb/orgs","repos_url":"https://api.github.com/users/dtarb/repos","events_url":"https://api.github.com/users/dtarb/events{/privacy}","received_events_url":"https://api.github.com/users/dtarb/received_events","type":"User","site_admin":false},"body":"An administrator should have the permissions to delete a published resource, authorization to be only used in extreme situations, but if the site is abused an administrator needs to be able to take a resource down.  Note that I prefer the term \"Administrator\" to super user in these messages.","created_at":"2016-03-02T20:22:33Z","updated_at":"2016-03-02T20:22:33Z","html_url":"https://github.com/hydroshare/hydroshare/pull/1011#discussion_r54784800","pull_request_url":"https://api.github.com/repos/hydroshare/hydroshare/pulls/1011","_links":{"self":{"href":"https://api.github.com/repos/hydroshare/hydroshare/pulls/comments/54784800"},"html":{"href":"https://github.com/hydroshare/hydroshare/pull/1011#discussion_r54784800"},"pull_request":{"href":"https://api.github.com/repos/hydroshare/hydroshare/pulls/1011"}}},"pull_request":{"url":"https://api.github.com/repos/hydroshare/hydroshare/pulls/1011","id":60753962,"html_url":"https://github.com/hydroshare/hydroshare/pull/1011","diff_url":"https://github.com/hydroshare/hydroshare/pull/1011.diff","patch_url":"https://github.com/hydroshare/hydroshare/pull/1011.patch","issue_url":"https://api.github.com/repos/hydroshare/hydroshare/issues/1011","number":1011,"state":"open","locked":false,"title":"Updated authorize function with unit tests","user":{"login":"pkdash","id":2523434,"avatar_url":"https://avatars.githubusercontent.com/u/2523434?v=3","gravatar_id":"","url":"https://api.github.com/users/pkdash","html_url":"https://github.com/pkdash","followers_url":"https://api.github.com/users/pkdash/followers","following_url":"https://api.github.com/users/pkdash/following{/other_user}","gists_url":"https://api.github.com/users/pkdash/gists{/gist_id}","starred_url":"https://api.github.com/users/pkdash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkdash/subscriptions","organizations_url":"https://api.github.com/users/pkdash/orgs","repos_url":"https://api.github.com/users/pkdash/repos","events_url":"https://api.github.com/users/pkdash/events{/privacy}","received_events_url":"https://api.github.com/users/pkdash/received_events","type":"User","site_admin":false},"body":"The updated authorize() makes it simper to use (I think) and makes it possible to write unit tests for it.","created_at":"2016-02-25T21:54:45Z","updated_at":"2016-03-02T20:22:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"317b785f5b6f65c6c1b8122413ec0578a5d9a554","assignee":{"login":"hyi","id":476302,"avatar_url":"https://avatars.githubusercontent.com/u/476302?v=3","gravatar_id":"","url":"https://api.github.com/users/hyi","html_url":"https://github.com/hyi","followers_url":"https://api.github.com/users/hyi/followers","following_url":"https://api.github.com/users/hyi/following{/other_user}","gists_url":"https://api.github.com/users/hyi/gists{/gist_id}","starred_url":"https://api.github.com/users/hyi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyi/subscriptions","organizations_url":"https://api.github.com/users/hyi/orgs","repos_url":"https://api.github.com/users/hyi/repos","events_url":"https://api.github.com/users/hyi/events{/privacy}","received_events_url":"https://api.github.com/users/hyi/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/hydroshare/hydroshare/pulls/1011/commits","review_comments_url":"https://api.github.com/repos/hydroshare/hydroshare/pulls/1011/comments","review_comment_url":"https://api.github.com/repos/hydroshare/hydroshare/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hydroshare/hydroshare/issues/1011/comments","statuses_url":"https://api.github.com/repos/hydroshare/hydroshare/statuses/a458c8d7d504854dd1f0755ba11092ff5c516e6b","head":{"label":"hydroshare:990-v2-unit-tests-authorize","ref":"990-v2-unit-tests-authorize","sha":"a458c8d7d504854dd1f0755ba11092ff5c516e6b","user":{"login":"hydroshare","id":3444493,"avatar_url":"https://avatars.githubusercontent.com/u/3444493?v=3","gravatar_id":"","url":"https://api.github.com/users/hydroshare","html_url":"https://github.com/hydroshare","followers_url":"https://api.github.com/users/hydroshare/followers","following_url":"https://api.github.com/users/hydroshare/following{/other_user}","gists_url":"https://api.github.com/users/hydroshare/gists{/gist_id}","starred_url":"https://api.github.com/users/hydroshare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hydroshare/subscriptions","organizations_url":"https://api.github.com/users/hydroshare/orgs","repos_url":"https://api.github.com/users/hydroshare/repos","events_url":"https://api.github.com/users/hydroshare/events{/privacy}","received_events_url":"https://api.github.com/users/hydroshare/received_events","type":"Organization","site_admin":false},"repo":{"id":24703136,"name":"hydroshare","full_name":"hydroshare/hydroshare","owner":{"login":"hydroshare","id":3444493,"avatar_url":"https://avatars.githubusercontent.com/u/3444493?v=3","gravatar_id":"","url":"https://api.github.com/users/hydroshare","html_url":"https://github.com/hydroshare","followers_url":"https://api.github.com/users/hydroshare/followers","following_url":"https://api.github.com/users/hydroshare/following{/other_user}","gists_url":"https://api.github.com/users/hydroshare/gists{/gist_id}","starred_url":"https://api.github.com/users/hydroshare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hydroshare/subscriptions","organizations_url":"https://api.github.com/users/hydroshare/orgs","repos_url":"https://api.github.com/users/hydroshare/repos","events_url":"https://api.github.com/users/hydroshare/events{/privacy}","received_events_url":"https://api.github.com/users/hydroshare/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hydroshare/hydroshare","description":"HydroShare is a collaborative website being developed for better access to data and models in the hydrologic sciences. ","fork":false,"url":"https://api.github.com/repos/hydroshare/hydroshare","forks_url":"https://api.github.com/repos/hydroshare/hydroshare/forks","keys_url":"https://api.github.com/repos/hydroshare/hydroshare/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hydroshare/hydroshare/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hydroshare/hydroshare/teams","hooks_url":"https://api.github.com/repos/hydroshare/hydroshare/hooks","issue_events_url":"https://api.github.com/repos/hydroshare/hydroshare/issues/events{/number}","events_url":"https://api.github.com/repos/hydroshare/hydroshare/events","assignees_url":"https://api.github.com/repos/hydroshare/hydroshare/assignees{/user}","branches_url":"https://api.github.com/repos/hydroshare/hydroshare/branches{/branch}","tags_url":"https://api.github.com/repos/hydroshare/hydroshare/tags","blobs_url":"https://api.github.com/repos/hydroshare/hydroshare/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hydroshare/hydroshare/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hydroshare/hydroshare/git/refs{/sha}","trees_url":"https://api.github.com/repos/hydroshare/hydroshare/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hydroshare/hydroshare/statuses/{sha}","languages_url":"https://api.github.com/repos/hydroshare/hydroshare/languages","stargazers_url":"https://api.github.com/repos/hydroshare/hydroshare/stargazers","contributors_url":"https://api.github.com/repos/hydroshare/hydroshare/contributors","subscribers_url":"https://api.github.com/repos/hydroshare/hydroshare/subscribers","subscription_url":"https://api.github.com/repos/hydroshare/hydroshare/subscription","commits_url":"https://api.github.com/repos/hydroshare/hydroshare/commits{/sha}","git_commits_url":"https://api.github.com/repos/hydroshare/hydroshare/git/commits{/sha}","comments_url":"https://api.github.com/repos/hydroshare/hydroshare/comments{/number}","issue_comment_url":"https://api.github.com/repos/hydroshare/hydroshare/issues/comments{/number}","contents_url":"https://api.github.com/repos/hydroshare/hydroshare/contents/{+path}","compare_url":"https://api.github.com/repos/hydroshare/hydroshare/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hydroshare/hydroshare/merges","archive_url":"https://api.github.com/repos/hydroshare/hydroshare/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hydroshare/hydroshare/downloads","issues_url":"https://api.github.com/repos/hydroshare/hydroshare/issues{/number}","pulls_url":"https://api.github.com/repos/hydroshare/hydroshare/pulls{/number}","milestones_url":"https://api.github.com/repos/hydroshare/hydroshare/milestones{/number}","notifications_url":"https://api.github.com/repos/hydroshare/hydroshare/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hydroshare/hydroshare/labels{/name}","releases_url":"https://api.github.com/repos/hydroshare/hydroshare/releases{/id}","deployments_url":"https://api.github.com/repos/hydroshare/hydroshare/deployments","created_at":"2014-10-02T02:19:41Z","updated_at":"2016-03-01T10:06:38Z","pushed_at":"2016-03-02T19:19:04Z","git_url":"git://github.com/hydroshare/hydroshare.git","ssh_url":"git@github.com:hydroshare/hydroshare.git","clone_url":"https://github.com/hydroshare/hydroshare.git","svn_url":"https://github.com/hydroshare/hydroshare","homepage":"https://www.hydroshare.org","size":84553,"stargazers_count":13,"watchers_count":13,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":220,"forks":2,"open_issues":220,"watchers":13,"default_branch":"develop"}},"base":{"label":"hydroshare:develop","ref":"develop","sha":"c7561b6a82cf7a728d48860a84b3842b8da48a16","user":{"login":"hydroshare","id":3444493,"avatar_url":"https://avatars.githubusercontent.com/u/3444493?v=3","gravatar_id":"","url":"https://api.github.com/users/hydroshare","html_url":"https://github.com/hydroshare","followers_url":"https://api.github.com/users/hydroshare/followers","following_url":"https://api.github.com/users/hydroshare/following{/other_user}","gists_url":"https://api.github.com/users/hydroshare/gists{/gist_id}","starred_url":"https://api.github.com/users/hydroshare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hydroshare/subscriptions","organizations_url":"https://api.github.com/users/hydroshare/orgs","repos_url":"https://api.github.com/users/hydroshare/repos","events_url":"https://api.github.com/users/hydroshare/events{/privacy}","received_events_url":"https://api.github.com/users/hydroshare/received_events","type":"Organization","site_admin":false},"repo":{"id":24703136,"name":"hydroshare","full_name":"hydroshare/hydroshare","owner":{"login":"hydroshare","id":3444493,"avatar_url":"https://avatars.githubusercontent.com/u/3444493?v=3","gravatar_id":"","url":"https://api.github.com/users/hydroshare","html_url":"https://github.com/hydroshare","followers_url":"https://api.github.com/users/hydroshare/followers","following_url":"https://api.github.com/users/hydroshare/following{/other_user}","gists_url":"https://api.github.com/users/hydroshare/gists{/gist_id}","starred_url":"https://api.github.com/users/hydroshare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hydroshare/subscriptions","organizations_url":"https://api.github.com/users/hydroshare/orgs","repos_url":"https://api.github.com/users/hydroshare/repos","events_url":"https://api.github.com/users/hydroshare/events{/privacy}","received_events_url":"https://api.github.com/users/hydroshare/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hydroshare/hydroshare","description":"HydroShare is a collaborative website being developed for better access to data and models in the hydrologic sciences. ","fork":false,"url":"https://api.github.com/repos/hydroshare/hydroshare","forks_url":"https://api.github.com/repos/hydroshare/hydroshare/forks","keys_url":"https://api.github.com/repos/hydroshare/hydroshare/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hydroshare/hydroshare/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hydroshare/hydroshare/teams","hooks_url":"https://api.github.com/repos/hydroshare/hydroshare/hooks","issue_events_url":"https://api.github.com/repos/hydroshare/hydroshare/issues/events{/number}","events_url":"https://api.github.com/repos/hydroshare/hydroshare/events","assignees_url":"https://api.github.com/repos/hydroshare/hydroshare/assignees{/user}","branches_url":"https://api.github.com/repos/hydroshare/hydroshare/branches{/branch}","tags_url":"https://api.github.com/repos/hydroshare/hydroshare/tags","blobs_url":"https://api.github.com/repos/hydroshare/hydroshare/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hydroshare/hydroshare/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hydroshare/hydroshare/git/refs{/sha}","trees_url":"https://api.github.com/repos/hydroshare/hydroshare/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hydroshare/hydroshare/statuses/{sha}","languages_url":"https://api.github.com/repos/hydroshare/hydroshare/languages","stargazers_url":"https://api.github.com/repos/hydroshare/hydroshare/stargazers","contributors_url":"https://api.github.com/repos/hydroshare/hydroshare/contributors","subscribers_url":"https://api.github.com/repos/hydroshare/hydroshare/subscribers","subscription_url":"https://api.github.com/repos/hydroshare/hydroshare/subscription","commits_url":"https://api.github.com/repos/hydroshare/hydroshare/commits{/sha}","git_commits_url":"https://api.github.com/repos/hydroshare/hydroshare/git/commits{/sha}","comments_url":"https://api.github.com/repos/hydroshare/hydroshare/comments{/number}","issue_comment_url":"https://api.github.com/repos/hydroshare/hydroshare/issues/comments{/number}","contents_url":"https://api.github.com/repos/hydroshare/hydroshare/contents/{+path}","compare_url":"https://api.github.com/repos/hydroshare/hydroshare/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hydroshare/hydroshare/merges","archive_url":"https://api.github.com/repos/hydroshare/hydroshare/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hydroshare/hydroshare/downloads","issues_url":"https://api.github.com/repos/hydroshare/hydroshare/issues{/number}","pulls_url":"https://api.github.com/repos/hydroshare/hydroshare/pulls{/number}","milestones_url":"https://api.github.com/repos/hydroshare/hydroshare/milestones{/number}","notifications_url":"https://api.github.com/repos/hydroshare/hydroshare/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hydroshare/hydroshare/labels{/name}","releases_url":"https://api.github.com/repos/hydroshare/hydroshare/releases{/id}","deployments_url":"https://api.github.com/repos/hydroshare/hydroshare/deployments","created_at":"2014-10-02T02:19:41Z","updated_at":"2016-03-01T10:06:38Z","pushed_at":"2016-03-02T19:19:04Z","git_url":"git://github.com/hydroshare/hydroshare.git","ssh_url":"git@github.com:hydroshare/hydroshare.git","clone_url":"https://github.com/hydroshare/hydroshare.git","svn_url":"https://github.com/hydroshare/hydroshare","homepage":"https://www.hydroshare.org","size":84553,"stargazers_count":13,"watchers_count":13,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":220,"forks":2,"open_issues":220,"watchers":13,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/hydroshare/hydroshare/pulls/1011"},"html":{"href":"https://github.com/hydroshare/hydroshare/pull/1011"},"issue":{"href":"https://api.github.com/repos/hydroshare/hydroshare/issues/1011"},"comments":{"href":"https://api.github.com/repos/hydroshare/hydroshare/issues/1011/comments"},"review_comments":{"href":"https://api.github.com/repos/hydroshare/hydroshare/pulls/1011/comments"},"review_comment":{"href":"https://api.github.com/repos/hydroshare/hydroshare/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hydroshare/hydroshare/pulls/1011/commits"},"statuses":{"href":"https://api.github.com/repos/hydroshare/hydroshare/statuses/a458c8d7d504854dd1f0755ba11092ff5c516e6b"}}}}