{"action":"reopened","number":66,"pull_request":{"url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/pulls/66","id":77378056,"html_url":"https://github.com/sul-dlss/digital_stacks_rails/pull/66","diff_url":"https://github.com/sul-dlss/digital_stacks_rails/pull/66.diff","patch_url":"https://github.com/sul-dlss/digital_stacks_rails/pull/66.patch","issue_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/issues/66","number":66,"state":"open","locked":false,"title":"don't grant IIIF bearer tokens to anonymous users","user":{"login":"jmartin-sul","id":7741604,"avatar_url":"https://avatars.githubusercontent.com/u/7741604?v=3","gravatar_id":"","url":"https://api.github.com/users/jmartin-sul","html_url":"https://github.com/jmartin-sul","followers_url":"https://api.github.com/users/jmartin-sul/followers","following_url":"https://api.github.com/users/jmartin-sul/following{/other_user}","gists_url":"https://api.github.com/users/jmartin-sul/gists{/gist_id}","starred_url":"https://api.github.com/users/jmartin-sul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmartin-sul/subscriptions","organizations_url":"https://api.github.com/users/jmartin-sul/orgs","repos_url":"https://api.github.com/users/jmartin-sul/repos","events_url":"https://api.github.com/users/jmartin-sul/events{/privacy}","received_events_url":"https://api.github.com/users/jmartin-sul/received_events","type":"User","site_admin":false},"body":"before the anonymous locatable user type was added, anonymous users weren't granted IIIF bearer tokens.  the addition of anonymous users introduced a regression:  previously, anonymous users would result in `nil` when `current_user` got called, but now `current_user` will never return nil, and so a caller would always get a token.\r\n\r\nthis PR fixes the regression by adding a flag indicating when a user is an anonymous locatable user, and checking that flag before the IIIF bearer token is issued.  it also adds a test for the new flag and fixes an old test so that it would've failed and caught the regression.\r\n\r\ndeployed to stacks-test.\r\n\r\npaired w/ @jkeck\r\n\r\nfixes sul-dlss/sul-embed#591\r\nconnect to sul-dlss/sul-embed#591","created_at":"2016-07-13T23:22:58Z","updated_at":"2016-07-14T18:02:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b0dc2ab1fe537b55c0b5530ef151461c34ae58a5","assignee":{"login":"jkeck","id":96776,"avatar_url":"https://avatars.githubusercontent.com/u/96776?v=3","gravatar_id":"","url":"https://api.github.com/users/jkeck","html_url":"https://github.com/jkeck","followers_url":"https://api.github.com/users/jkeck/followers","following_url":"https://api.github.com/users/jkeck/following{/other_user}","gists_url":"https://api.github.com/users/jkeck/gists{/gist_id}","starred_url":"https://api.github.com/users/jkeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkeck/subscriptions","organizations_url":"https://api.github.com/users/jkeck/orgs","repos_url":"https://api.github.com/users/jkeck/repos","events_url":"https://api.github.com/users/jkeck/events{/privacy}","received_events_url":"https://api.github.com/users/jkeck/received_events","type":"User","site_admin":false},"assignees":[{"login":"jkeck","id":96776,"avatar_url":"https://avatars.githubusercontent.com/u/96776?v=3","gravatar_id":"","url":"https://api.github.com/users/jkeck","html_url":"https://github.com/jkeck","followers_url":"https://api.github.com/users/jkeck/followers","following_url":"https://api.github.com/users/jkeck/following{/other_user}","gists_url":"https://api.github.com/users/jkeck/gists{/gist_id}","starred_url":"https://api.github.com/users/jkeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkeck/subscriptions","organizations_url":"https://api.github.com/users/jkeck/orgs","repos_url":"https://api.github.com/users/jkeck/repos","events_url":"https://api.github.com/users/jkeck/events{/privacy}","received_events_url":"https://api.github.com/users/jkeck/received_events","type":"User","site_admin":false},{"login":"jmartin-sul","id":7741604,"avatar_url":"https://avatars.githubusercontent.com/u/7741604?v=3","gravatar_id":"","url":"https://api.github.com/users/jmartin-sul","html_url":"https://github.com/jmartin-sul","followers_url":"https://api.github.com/users/jmartin-sul/followers","following_url":"https://api.github.com/users/jmartin-sul/following{/other_user}","gists_url":"https://api.github.com/users/jmartin-sul/gists{/gist_id}","starred_url":"https://api.github.com/users/jmartin-sul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmartin-sul/subscriptions","organizations_url":"https://api.github.com/users/jmartin-sul/orgs","repos_url":"https://api.github.com/users/jmartin-sul/repos","events_url":"https://api.github.com/users/jmartin-sul/events{/privacy}","received_events_url":"https://api.github.com/users/jmartin-sul/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/pulls/66/commits","review_comments_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/pulls/66/comments","review_comment_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/issues/66/comments","statuses_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/statuses/cf3bd57bf1e49956418c7d575d736da9030349f9","head":{"label":"sul-dlss:sul-embed-591-iiif-token-creation","ref":"sul-embed-591-iiif-token-creation","sha":"cf3bd57bf1e49956418c7d575d736da9030349f9","user":{"login":"sul-dlss","id":230583,"avatar_url":"https://avatars.githubusercontent.com/u/230583?v=3","gravatar_id":"","url":"https://api.github.com/users/sul-dlss","html_url":"https://github.com/sul-dlss","followers_url":"https://api.github.com/users/sul-dlss/followers","following_url":"https://api.github.com/users/sul-dlss/following{/other_user}","gists_url":"https://api.github.com/users/sul-dlss/gists{/gist_id}","starred_url":"https://api.github.com/users/sul-dlss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sul-dlss/subscriptions","organizations_url":"https://api.github.com/users/sul-dlss/orgs","repos_url":"https://api.github.com/users/sul-dlss/repos","events_url":"https://api.github.com/users/sul-dlss/events{/privacy}","received_events_url":"https://api.github.com/users/sul-dlss/received_events","type":"Organization","site_admin":false},"repo":{"id":41568744,"name":"digital_stacks_rails","full_name":"sul-dlss/digital_stacks_rails","owner":{"login":"sul-dlss","id":230583,"avatar_url":"https://avatars.githubusercontent.com/u/230583?v=3","gravatar_id":"","url":"https://api.github.com/users/sul-dlss","html_url":"https://github.com/sul-dlss","followers_url":"https://api.github.com/users/sul-dlss/followers","following_url":"https://api.github.com/users/sul-dlss/following{/other_user}","gists_url":"https://api.github.com/users/sul-dlss/gists{/gist_id}","starred_url":"https://api.github.com/users/sul-dlss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sul-dlss/subscriptions","organizations_url":"https://api.github.com/users/sul-dlss/orgs","repos_url":"https://api.github.com/users/sul-dlss/repos","events_url":"https://api.github.com/users/sul-dlss/events{/privacy}","received_events_url":"https://api.github.com/users/sul-dlss/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sul-dlss/digital_stacks_rails","description":"Delivering digital resources to patrons.","fork":false,"url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails","forks_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/forks","keys_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/teams","hooks_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/hooks","issue_events_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/issues/events{/number}","events_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/events","assignees_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/assignees{/user}","branches_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/branches{/branch}","tags_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/tags","blobs_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/statuses/{sha}","languages_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/languages","stargazers_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/stargazers","contributors_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/contributors","subscribers_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/subscribers","subscription_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/subscription","commits_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/contents/{+path}","compare_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/merges","archive_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/downloads","issues_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/issues{/number}","pulls_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/pulls{/number}","milestones_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/milestones{/number}","notifications_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/labels{/name}","releases_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/releases{/id}","deployments_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/deployments","created_at":"2015-08-28T20:54:33Z","updated_at":"2016-01-25T22:55:08Z","pushed_at":"2016-07-13T23:22:58Z","git_url":"git://github.com/sul-dlss/digital_stacks_rails.git","ssh_url":"git@github.com:sul-dlss/digital_stacks_rails.git","clone_url":"https://github.com/sul-dlss/digital_stacks_rails.git","svn_url":"https://github.com/sul-dlss/digital_stacks_rails","homepage":"http://stacks.stanford.edu","size":303,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":10,"forks":0,"open_issues":10,"watchers":1,"default_branch":"master"}},"base":{"label":"sul-dlss:master","ref":"master","sha":"76e9f783e0c5fa263c1d6d6e6e891acdb791a742","user":{"login":"sul-dlss","id":230583,"avatar_url":"https://avatars.githubusercontent.com/u/230583?v=3","gravatar_id":"","url":"https://api.github.com/users/sul-dlss","html_url":"https://github.com/sul-dlss","followers_url":"https://api.github.com/users/sul-dlss/followers","following_url":"https://api.github.com/users/sul-dlss/following{/other_user}","gists_url":"https://api.github.com/users/sul-dlss/gists{/gist_id}","starred_url":"https://api.github.com/users/sul-dlss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sul-dlss/subscriptions","organizations_url":"https://api.github.com/users/sul-dlss/orgs","repos_url":"https://api.github.com/users/sul-dlss/repos","events_url":"https://api.github.com/users/sul-dlss/events{/privacy}","received_events_url":"https://api.github.com/users/sul-dlss/received_events","type":"Organization","site_admin":false},"repo":{"id":41568744,"name":"digital_stacks_rails","full_name":"sul-dlss/digital_stacks_rails","owner":{"login":"sul-dlss","id":230583,"avatar_url":"https://avatars.githubusercontent.com/u/230583?v=3","gravatar_id":"","url":"https://api.github.com/users/sul-dlss","html_url":"https://github.com/sul-dlss","followers_url":"https://api.github.com/users/sul-dlss/followers","following_url":"https://api.github.com/users/sul-dlss/following{/other_user}","gists_url":"https://api.github.com/users/sul-dlss/gists{/gist_id}","starred_url":"https://api.github.com/users/sul-dlss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sul-dlss/subscriptions","organizations_url":"https://api.github.com/users/sul-dlss/orgs","repos_url":"https://api.github.com/users/sul-dlss/repos","events_url":"https://api.github.com/users/sul-dlss/events{/privacy}","received_events_url":"https://api.github.com/users/sul-dlss/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sul-dlss/digital_stacks_rails","description":"Delivering digital resources to patrons.","fork":false,"url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails","forks_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/forks","keys_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/teams","hooks_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/hooks","issue_events_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/issues/events{/number}","events_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/events","assignees_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/assignees{/user}","branches_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/branches{/branch}","tags_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/tags","blobs_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/statuses/{sha}","languages_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/languages","stargazers_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/stargazers","contributors_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/contributors","subscribers_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/subscribers","subscription_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/subscription","commits_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/contents/{+path}","compare_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/merges","archive_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/downloads","issues_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/issues{/number}","pulls_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/pulls{/number}","milestones_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/milestones{/number}","notifications_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/labels{/name}","releases_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/releases{/id}","deployments_url":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/deployments","created_at":"2015-08-28T20:54:33Z","updated_at":"2016-01-25T22:55:08Z","pushed_at":"2016-07-13T23:22:58Z","git_url":"git://github.com/sul-dlss/digital_stacks_rails.git","ssh_url":"git@github.com:sul-dlss/digital_stacks_rails.git","clone_url":"https://github.com/sul-dlss/digital_stacks_rails.git","svn_url":"https://github.com/sul-dlss/digital_stacks_rails","homepage":"http://stacks.stanford.edu","size":303,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":10,"forks":0,"open_issues":10,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/pulls/66"},"html":{"href":"https://github.com/sul-dlss/digital_stacks_rails/pull/66"},"issue":{"href":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/issues/66"},"comments":{"href":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/issues/66/comments"},"review_comments":{"href":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/pulls/66/comments"},"review_comment":{"href":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/pulls/66/commits"},"statuses":{"href":"https://api.github.com/repos/sul-dlss/digital_stacks_rails/statuses/cf3bd57bf1e49956418c7d575d736da9030349f9"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":1,"review_comments":0,"commits":2,"additions":16,"deletions":5,"changed_files":5}}
{"actor":{"display_login":"tingulfsen"}}