{"action":"created","comment":{"url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/comments/42375287","id":42375287,"diff_hunk":"@@ -983,6 +985,50 @@ def test8704(self):\n         finally:\n             user_client.__del__()\n \n+    def test13018(self):\n+        \"\"\"\n+        Test that image in share is unavailable when share\n+        is inactive or expired\n+        \"\"\"\n+        owner = self.new_client()\n+        member, mobj = self.new_client_and_user()\n+\n+        createTestImage(owner.sf)\n+        image = owner.sf.getQueryService().findAll(\"Image\", None)[0]\n+\n+        o_share = owner.sf.getShareService()\n+        sid = o_share.createShare(\"\", None, [image], [mobj], [], True)\n+\n+        m_share = member.sf.getShareService()\n+        m_share.activate(sid)\n+\n+        o_share.setActive(sid, False)\n+        with pytest.raises(omero.ValidationException):\n+            m_share.activate(sid)\n+\n+        with pytest.raises(omero.ValidationException):\n+            obj = omero.model.ShareI(sid, False)\n+            member.sf.setSecurityContext(obj)\n+\n+        # test inactive share, if member has no access to the image\n+        s = o_share.getShare(sid)\n+        with pytest.raises(Glacier2.PermissionDeniedException):\n+            self.new_client(session=s.uuid)\n+\n+        # activate again\n+        o_share.setActive(sid, True)\n+\n+        # test expired share, if member has no access to the image\n+        expiration = long(time.time() * 1000) + 86400","path":"components/tools/OmeroPy/test/integration/test_ishare.py","position":47,"original_position":47,"commit_id":"a80b486c65f4db72a025b7c4359ea1112b5d1eac","original_commit_id":"a80b486c65f4db72a025b7c4359ea1112b5d1eac","user":{"login":"will-moore","id":900055,"avatar_url":"https://avatars.githubusercontent.com/u/900055?v=3","gravatar_id":"","url":"https://api.github.com/users/will-moore","html_url":"https://github.com/will-moore","followers_url":"https://api.github.com/users/will-moore/followers","following_url":"https://api.github.com/users/will-moore/following{/other_user}","gists_url":"https://api.github.com/users/will-moore/gists{/gist_id}","starred_url":"https://api.github.com/users/will-moore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/will-moore/subscriptions","organizations_url":"https://api.github.com/users/will-moore/orgs","repos_url":"https://api.github.com/users/will-moore/repos","events_url":"https://api.github.com/users/will-moore/events{/privacy}","received_events_url":"https://api.github.com/users/will-moore/received_events","type":"User","site_admin":false},"body":"Is there any relevance to the 86400? It looks like this is setting an expiration date in the future? But that wouldn't then be expired, so I'm confused.","created_at":"2015-10-19T14:13:07Z","updated_at":"2015-10-19T14:13:07Z","html_url":"https://github.com/openmicroscopy/openmicroscopy/pull/4258#discussion_r42375287","pull_request_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/4258","_links":{"self":{"href":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/comments/42375287"},"html":{"href":"https://github.com/openmicroscopy/openmicroscopy/pull/4258#discussion_r42375287"},"pull_request":{"href":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/4258"}}},"pull_request":{"url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/4258","id":47529131,"html_url":"https://github.com/openmicroscopy/openmicroscopy/pull/4258","diff_url":"https://github.com/openmicroscopy/openmicroscopy/pull/4258.diff","patch_url":"https://github.com/openmicroscopy/openmicroscopy/pull/4258.patch","issue_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues/4258","number":4258,"state":"open","locked":false,"title":"trac 13018: disabling inactive share access","user":{"login":"joshmoore","id":88113,"avatar_url":"https://avatars.githubusercontent.com/u/88113?v=3","gravatar_id":"","url":"https://api.github.com/users/joshmoore","html_url":"https://github.com/joshmoore","followers_url":"https://api.github.com/users/joshmoore/followers","following_url":"https://api.github.com/users/joshmoore/following{/other_user}","gists_url":"https://api.github.com/users/joshmoore/gists{/gist_id}","starred_url":"https://api.github.com/users/joshmoore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshmoore/subscriptions","organizations_url":"https://api.github.com/users/joshmoore/orgs","repos_url":"https://api.github.com/users/joshmoore/repos","events_url":"https://api.github.com/users/joshmoore/events{/privacy}","received_events_url":"https://api.github.com/users/joshmoore/received_events","type":"User","site_admin":false},"body":"When using `joinSession` on an inactive share, throw PermissionDenied:\r\n\r\n```\r\n        CannotCreateSessionException Raised if the session\r\nE       PermissionDeniedException: exception ::Glacier2::PermissionDeniedException\r\nE       {\r\nE           reason = Share:1489 (497c947c-8e57-4e9a-9886-f3f87e6016a6) is inactive\r\nE       }\r\n\r\n```\r\n\r\nSee: https://trac.openmicroscopy.org/ome/ticket/13018#comment:4","created_at":"2015-10-13T12:56:37Z","updated_at":"2015-10-19T14:13:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"56c3b6b7187c667b65432e5bf54c542fdcf47653","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/4258/commits","review_comments_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/4258/comments","review_comment_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues/4258/comments","statuses_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/statuses/a80b486c65f4db72a025b7c4359ea1112b5d1eac","head":{"label":"joshmoore:trac13018-inactive-share","ref":"trac13018-inactive-share","sha":"a80b486c65f4db72a025b7c4359ea1112b5d1eac","user":{"login":"joshmoore","id":88113,"avatar_url":"https://avatars.githubusercontent.com/u/88113?v=3","gravatar_id":"","url":"https://api.github.com/users/joshmoore","html_url":"https://github.com/joshmoore","followers_url":"https://api.github.com/users/joshmoore/followers","following_url":"https://api.github.com/users/joshmoore/following{/other_user}","gists_url":"https://api.github.com/users/joshmoore/gists{/gist_id}","starred_url":"https://api.github.com/users/joshmoore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshmoore/subscriptions","organizations_url":"https://api.github.com/users/joshmoore/orgs","repos_url":"https://api.github.com/users/joshmoore/repos","events_url":"https://api.github.com/users/joshmoore/events{/privacy}","received_events_url":"https://api.github.com/users/joshmoore/received_events","type":"User","site_admin":false},"repo":{"id":2347571,"name":"openmicroscopy","full_name":"joshmoore/openmicroscopy","owner":{"login":"joshmoore","id":88113,"avatar_url":"https://avatars.githubusercontent.com/u/88113?v=3","gravatar_id":"","url":"https://api.github.com/users/joshmoore","html_url":"https://github.com/joshmoore","followers_url":"https://api.github.com/users/joshmoore/followers","following_url":"https://api.github.com/users/joshmoore/following{/other_user}","gists_url":"https://api.github.com/users/joshmoore/gists{/gist_id}","starred_url":"https://api.github.com/users/joshmoore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshmoore/subscriptions","organizations_url":"https://api.github.com/users/joshmoore/orgs","repos_url":"https://api.github.com/users/joshmoore/repos","events_url":"https://api.github.com/users/joshmoore/events{/privacy}","received_events_url":"https://api.github.com/users/joshmoore/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/joshmoore/openmicroscopy","description":"OME (Open Microscopy Environment) develops open-source software and data format standards for the storage and manipulation of biological light microscopy data. A joint project between universities, research establishments and industry in Europe and the USA, OME has over 20 active researchers with strong links to the microscopy community. Funded by private and public research grants, OME has been a major force on the international microscopy stage since 2000.","fork":true,"url":"https://api.github.com/repos/joshmoore/openmicroscopy","forks_url":"https://api.github.com/repos/joshmoore/openmicroscopy/forks","keys_url":"https://api.github.com/repos/joshmoore/openmicroscopy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/joshmoore/openmicroscopy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/joshmoore/openmicroscopy/teams","hooks_url":"https://api.github.com/repos/joshmoore/openmicroscopy/hooks","issue_events_url":"https://api.github.com/repos/joshmoore/openmicroscopy/issues/events{/number}","events_url":"https://api.github.com/repos/joshmoore/openmicroscopy/events","assignees_url":"https://api.github.com/repos/joshmoore/openmicroscopy/assignees{/user}","branches_url":"https://api.github.com/repos/joshmoore/openmicroscopy/branches{/branch}","tags_url":"https://api.github.com/repos/joshmoore/openmicroscopy/tags","blobs_url":"https://api.github.com/repos/joshmoore/openmicroscopy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/joshmoore/openmicroscopy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/joshmoore/openmicroscopy/git/refs{/sha}","trees_url":"https://api.github.com/repos/joshmoore/openmicroscopy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/joshmoore/openmicroscopy/statuses/{sha}","languages_url":"https://api.github.com/repos/joshmoore/openmicroscopy/languages","stargazers_url":"https://api.github.com/repos/joshmoore/openmicroscopy/stargazers","contributors_url":"https://api.github.com/repos/joshmoore/openmicroscopy/contributors","subscribers_url":"https://api.github.com/repos/joshmoore/openmicroscopy/subscribers","subscription_url":"https://api.github.com/repos/joshmoore/openmicroscopy/subscription","commits_url":"https://api.github.com/repos/joshmoore/openmicroscopy/commits{/sha}","git_commits_url":"https://api.github.com/repos/joshmoore/openmicroscopy/git/commits{/sha}","comments_url":"https://api.github.com/repos/joshmoore/openmicroscopy/comments{/number}","issue_comment_url":"https://api.github.com/repos/joshmoore/openmicroscopy/issues/comments{/number}","contents_url":"https://api.github.com/repos/joshmoore/openmicroscopy/contents/{+path}","compare_url":"https://api.github.com/repos/joshmoore/openmicroscopy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/joshmoore/openmicroscopy/merges","archive_url":"https://api.github.com/repos/joshmoore/openmicroscopy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/joshmoore/openmicroscopy/downloads","issues_url":"https://api.github.com/repos/joshmoore/openmicroscopy/issues{/number}","pulls_url":"https://api.github.com/repos/joshmoore/openmicroscopy/pulls{/number}","milestones_url":"https://api.github.com/repos/joshmoore/openmicroscopy/milestones{/number}","notifications_url":"https://api.github.com/repos/joshmoore/openmicroscopy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/joshmoore/openmicroscopy/labels{/name}","releases_url":"https://api.github.com/repos/joshmoore/openmicroscopy/releases{/id}","created_at":"2011-09-08T09:53:15Z","updated_at":"2015-09-18T11:02:59Z","pushed_at":"2015-10-16T20:48:38Z","git_url":"git://github.com/joshmoore/openmicroscopy.git","ssh_url":"git@github.com:joshmoore/openmicroscopy.git","clone_url":"https://github.com/joshmoore/openmicroscopy.git","svn_url":"https://github.com/joshmoore/openmicroscopy","homepage":"http://www.openmicroscopy.org","size":2114627,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":true,"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":3,"default_branch":"omero43-ice34"}},"base":{"label":"openmicroscopy:develop","ref":"develop","sha":"8f546d6c3450076173bc6f33aeef00659cfea0ce","user":{"login":"openmicroscopy","id":975861,"avatar_url":"https://avatars.githubusercontent.com/u/975861?v=3","gravatar_id":"","url":"https://api.github.com/users/openmicroscopy","html_url":"https://github.com/openmicroscopy","followers_url":"https://api.github.com/users/openmicroscopy/followers","following_url":"https://api.github.com/users/openmicroscopy/following{/other_user}","gists_url":"https://api.github.com/users/openmicroscopy/gists{/gist_id}","starred_url":"https://api.github.com/users/openmicroscopy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openmicroscopy/subscriptions","organizations_url":"https://api.github.com/users/openmicroscopy/orgs","repos_url":"https://api.github.com/users/openmicroscopy/repos","events_url":"https://api.github.com/users/openmicroscopy/events{/privacy}","received_events_url":"https://api.github.com/users/openmicroscopy/received_events","type":"Organization","site_admin":false},"repo":{"id":2228226,"name":"openmicroscopy","full_name":"openmicroscopy/openmicroscopy","owner":{"login":"openmicroscopy","id":975861,"avatar_url":"https://avatars.githubusercontent.com/u/975861?v=3","gravatar_id":"","url":"https://api.github.com/users/openmicroscopy","html_url":"https://github.com/openmicroscopy","followers_url":"https://api.github.com/users/openmicroscopy/followers","following_url":"https://api.github.com/users/openmicroscopy/following{/other_user}","gists_url":"https://api.github.com/users/openmicroscopy/gists{/gist_id}","starred_url":"https://api.github.com/users/openmicroscopy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openmicroscopy/subscriptions","organizations_url":"https://api.github.com/users/openmicroscopy/orgs","repos_url":"https://api.github.com/users/openmicroscopy/repos","events_url":"https://api.github.com/users/openmicroscopy/events{/privacy}","received_events_url":"https://api.github.com/users/openmicroscopy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openmicroscopy/openmicroscopy","description":"OME (Open Microscopy Environment) develops open-source software and data format standards for the storage and manipulation of biological light microscopy data. A joint project between universities, research establishments and industry in Europe and the USA, OME has over 20 active researchers with strong links to the microscopy community. Funded by private and public research grants, OME has been a major force on the international microscopy stage since 2000.","fork":false,"url":"https://api.github.com/repos/openmicroscopy/openmicroscopy","forks_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/forks","keys_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/teams","hooks_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/hooks","issue_events_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues/events{/number}","events_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/events","assignees_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/assignees{/user}","branches_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/branches{/branch}","tags_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/tags","blobs_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/git/refs{/sha}","trees_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/statuses/{sha}","languages_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/languages","stargazers_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/stargazers","contributors_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/contributors","subscribers_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/subscribers","subscription_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/subscription","commits_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/commits{/sha}","git_commits_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/git/commits{/sha}","comments_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/comments{/number}","issue_comment_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues/comments{/number}","contents_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/contents/{+path}","compare_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/merges","archive_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/downloads","issues_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues{/number}","pulls_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls{/number}","milestones_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/milestones{/number}","notifications_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/labels{/name}","releases_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/releases{/id}","created_at":"2011-08-18T14:26:02Z","updated_at":"2015-10-19T10:23:46Z","pushed_at":"2015-10-19T13:57:16Z","git_url":"git://github.com/openmicroscopy/openmicroscopy.git","ssh_url":"git@github.com:openmicroscopy/openmicroscopy.git","clone_url":"https://github.com/openmicroscopy/openmicroscopy.git","svn_url":"https://github.com/openmicroscopy/openmicroscopy","homepage":"http://www.openmicroscopy.org","size":2172600,"stargazers_count":70,"watchers_count":70,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":68,"mirror_url":null,"open_issues_count":37,"forks":68,"open_issues":37,"watchers":70,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/4258"},"html":{"href":"https://github.com/openmicroscopy/openmicroscopy/pull/4258"},"issue":{"href":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues/4258"},"comments":{"href":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues/4258/comments"},"review_comments":{"href":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/4258/comments"},"review_comment":{"href":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/4258/commits"},"statuses":{"href":"https://api.github.com/repos/openmicroscopy/openmicroscopy/statuses/a80b486c65f4db72a025b7c4359ea1112b5d1eac"}}}}