{"action":"created","comment":{"url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/pulls/comments/60606022","id":60606022,"diff_hunk":"@@ -159,6 +159,9 @@ function factory(\n         if(!('identity' in session) && self.credential.sysIsPublic) {\n           // display a public credential to a non-authenticated user\n           _display('credentialInfo');\n+        } else if('CREDENTIAL_ADMIN' in session.identity.sysPermissionTable) {","path":"credential-controller.js","position":4,"original_position":4,"commit_id":"c324a301f91e1440b07e21fc2b61208c27e63584","original_commit_id":"c324a301f91e1440b07e21fc2b61208c27e63584","user":{"login":"mattcollier","id":902041,"avatar_url":"https://avatars.githubusercontent.com/u/902041?v=3","gravatar_id":"","url":"https://api.github.com/users/mattcollier","html_url":"https://github.com/mattcollier","followers_url":"https://api.github.com/users/mattcollier/followers","following_url":"https://api.github.com/users/mattcollier/following{/other_user}","gists_url":"https://api.github.com/users/mattcollier/gists{/gist_id}","starred_url":"https://api.github.com/users/mattcollier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattcollier/subscriptions","organizations_url":"https://api.github.com/users/mattcollier/orgs","repos_url":"https://api.github.com/users/mattcollier/repos","events_url":"https://api.github.com/users/mattcollier/events{/privacy}","received_events_url":"https://api.github.com/users/mattcollier/received_events","type":"User","site_admin":false},"body":"@dlongley I actually tested this where sysPermission was undefined and it behaves properly.  I also created this test: https://repl.it/CIO5\r\n\r\nDoes this address your concern?","created_at":"2016-04-21T15:50:18Z","updated_at":"2016-04-21T15:50:18Z","html_url":"https://github.com/digitalbazaar/bedrock-angular-credential/pull/4#discussion_r60606022","pull_request_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/pulls/comments/60606022"},"html":{"href":"https://github.com/digitalbazaar/bedrock-angular-credential/pull/4#discussion_r60606022"},"pull_request":{"href":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/pulls/4","id":67110003,"html_url":"https://github.com/digitalbazaar/bedrock-angular-credential/pull/4","diff_url":"https://github.com/digitalbazaar/bedrock-angular-credential/pull/4.diff","patch_url":"https://github.com/digitalbazaar/bedrock-angular-credential/pull/4.patch","issue_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/issues/4","number":4,"state":"open","locked":false,"title":"Allow admin to view any credential.","user":{"login":"mattcollier","id":902041,"avatar_url":"https://avatars.githubusercontent.com/u/902041?v=3","gravatar_id":"","url":"https://api.github.com/users/mattcollier","html_url":"https://github.com/mattcollier","followers_url":"https://api.github.com/users/mattcollier/followers","following_url":"https://api.github.com/users/mattcollier/following{/other_user}","gists_url":"https://api.github.com/users/mattcollier/gists{/gist_id}","starred_url":"https://api.github.com/users/mattcollier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattcollier/subscriptions","organizations_url":"https://api.github.com/users/mattcollier/orgs","repos_url":"https://api.github.com/users/mattcollier/repos","events_url":"https://api.github.com/users/mattcollier/events{/privacy}","received_events_url":"https://api.github.com/users/mattcollier/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-20T00:05:54Z","updated_at":"2016-04-21T15:50:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fd80ff885195666fe8f6aa1aff46449ac4e1e5a8","assignee":{"login":"mattcollier","id":902041,"avatar_url":"https://avatars.githubusercontent.com/u/902041?v=3","gravatar_id":"","url":"https://api.github.com/users/mattcollier","html_url":"https://github.com/mattcollier","followers_url":"https://api.github.com/users/mattcollier/followers","following_url":"https://api.github.com/users/mattcollier/following{/other_user}","gists_url":"https://api.github.com/users/mattcollier/gists{/gist_id}","starred_url":"https://api.github.com/users/mattcollier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattcollier/subscriptions","organizations_url":"https://api.github.com/users/mattcollier/orgs","repos_url":"https://api.github.com/users/mattcollier/repos","events_url":"https://api.github.com/users/mattcollier/events{/privacy}","received_events_url":"https://api.github.com/users/mattcollier/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/pulls/4/commits","review_comments_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/pulls/4/comments","review_comment_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/pulls/comments{/number}","comments_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/issues/4/comments","statuses_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/statuses/c324a301f91e1440b07e21fc2b61208c27e63584","head":{"label":"digitalbazaar:adminPermission","ref":"adminPermission","sha":"c324a301f91e1440b07e21fc2b61208c27e63584","user":{"login":"digitalbazaar","id":167436,"avatar_url":"https://avatars.githubusercontent.com/u/167436?v=3","gravatar_id":"","url":"https://api.github.com/users/digitalbazaar","html_url":"https://github.com/digitalbazaar","followers_url":"https://api.github.com/users/digitalbazaar/followers","following_url":"https://api.github.com/users/digitalbazaar/following{/other_user}","gists_url":"https://api.github.com/users/digitalbazaar/gists{/gist_id}","starred_url":"https://api.github.com/users/digitalbazaar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/digitalbazaar/subscriptions","organizations_url":"https://api.github.com/users/digitalbazaar/orgs","repos_url":"https://api.github.com/users/digitalbazaar/repos","events_url":"https://api.github.com/users/digitalbazaar/events{/privacy}","received_events_url":"https://api.github.com/users/digitalbazaar/received_events","type":"Organization","site_admin":false},"repo":{"id":37619131,"name":"bedrock-angular-credential","full_name":"digitalbazaar/bedrock-angular-credential","owner":{"login":"digitalbazaar","id":167436,"avatar_url":"https://avatars.githubusercontent.com/u/167436?v=3","gravatar_id":"","url":"https://api.github.com/users/digitalbazaar","html_url":"https://github.com/digitalbazaar","followers_url":"https://api.github.com/users/digitalbazaar/followers","following_url":"https://api.github.com/users/digitalbazaar/following{/other_user}","gists_url":"https://api.github.com/users/digitalbazaar/gists{/gist_id}","starred_url":"https://api.github.com/users/digitalbazaar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/digitalbazaar/subscriptions","organizations_url":"https://api.github.com/users/digitalbazaar/orgs","repos_url":"https://api.github.com/users/digitalbazaar/repos","events_url":"https://api.github.com/users/digitalbazaar/events{/privacy}","received_events_url":"https://api.github.com/users/digitalbazaar/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/digitalbazaar/bedrock-angular-credential","description":"Bedrock Credential support","fork":false,"url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential","forks_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/forks","keys_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/keys{/key_id}","collaborators_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/teams","hooks_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/hooks","issue_events_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/issues/events{/number}","events_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/events","assignees_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/assignees{/user}","branches_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/branches{/branch}","tags_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/tags","blobs_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/git/refs{/sha}","trees_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/git/trees{/sha}","statuses_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/statuses/{sha}","languages_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/languages","stargazers_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/stargazers","contributors_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/contributors","subscribers_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/subscribers","subscription_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/subscription","commits_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/commits{/sha}","git_commits_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/git/commits{/sha}","comments_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/comments{/number}","issue_comment_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/issues/comments{/number}","contents_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/contents/{+path}","compare_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/compare/{base}...{head}","merges_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/merges","archive_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/downloads","issues_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/issues{/number}","pulls_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/pulls{/number}","milestones_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/milestones{/number}","notifications_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/labels{/name}","releases_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/releases{/id}","deployments_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/deployments","created_at":"2015-06-17T20:29:21Z","updated_at":"2016-02-05T18:01:40Z","pushed_at":"2016-04-20T00:05:56Z","git_url":"git://github.com/digitalbazaar/bedrock-angular-credential.git","ssh_url":"git@github.com:digitalbazaar/bedrock-angular-credential.git","clone_url":"https://github.com/digitalbazaar/bedrock-angular-credential.git","svn_url":"https://github.com/digitalbazaar/bedrock-angular-credential","homepage":null,"size":74,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"digitalbazaar:master","ref":"master","sha":"bf4eccb5aedea3617d3e524384f8c13b0ee1cb80","user":{"login":"digitalbazaar","id":167436,"avatar_url":"https://avatars.githubusercontent.com/u/167436?v=3","gravatar_id":"","url":"https://api.github.com/users/digitalbazaar","html_url":"https://github.com/digitalbazaar","followers_url":"https://api.github.com/users/digitalbazaar/followers","following_url":"https://api.github.com/users/digitalbazaar/following{/other_user}","gists_url":"https://api.github.com/users/digitalbazaar/gists{/gist_id}","starred_url":"https://api.github.com/users/digitalbazaar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/digitalbazaar/subscriptions","organizations_url":"https://api.github.com/users/digitalbazaar/orgs","repos_url":"https://api.github.com/users/digitalbazaar/repos","events_url":"https://api.github.com/users/digitalbazaar/events{/privacy}","received_events_url":"https://api.github.com/users/digitalbazaar/received_events","type":"Organization","site_admin":false},"repo":{"id":37619131,"name":"bedrock-angular-credential","full_name":"digitalbazaar/bedrock-angular-credential","owner":{"login":"digitalbazaar","id":167436,"avatar_url":"https://avatars.githubusercontent.com/u/167436?v=3","gravatar_id":"","url":"https://api.github.com/users/digitalbazaar","html_url":"https://github.com/digitalbazaar","followers_url":"https://api.github.com/users/digitalbazaar/followers","following_url":"https://api.github.com/users/digitalbazaar/following{/other_user}","gists_url":"https://api.github.com/users/digitalbazaar/gists{/gist_id}","starred_url":"https://api.github.com/users/digitalbazaar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/digitalbazaar/subscriptions","organizations_url":"https://api.github.com/users/digitalbazaar/orgs","repos_url":"https://api.github.com/users/digitalbazaar/repos","events_url":"https://api.github.com/users/digitalbazaar/events{/privacy}","received_events_url":"https://api.github.com/users/digitalbazaar/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/digitalbazaar/bedrock-angular-credential","description":"Bedrock Credential support","fork":false,"url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential","forks_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/forks","keys_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/keys{/key_id}","collaborators_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/teams","hooks_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/hooks","issue_events_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/issues/events{/number}","events_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/events","assignees_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/assignees{/user}","branches_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/branches{/branch}","tags_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/tags","blobs_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/git/refs{/sha}","trees_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/git/trees{/sha}","statuses_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/statuses/{sha}","languages_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/languages","stargazers_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/stargazers","contributors_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/contributors","subscribers_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/subscribers","subscription_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/subscription","commits_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/commits{/sha}","git_commits_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/git/commits{/sha}","comments_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/comments{/number}","issue_comment_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/issues/comments{/number}","contents_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/contents/{+path}","compare_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/compare/{base}...{head}","merges_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/merges","archive_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/downloads","issues_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/issues{/number}","pulls_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/pulls{/number}","milestones_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/milestones{/number}","notifications_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/labels{/name}","releases_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/releases{/id}","deployments_url":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/deployments","created_at":"2015-06-17T20:29:21Z","updated_at":"2016-02-05T18:01:40Z","pushed_at":"2016-04-20T00:05:56Z","git_url":"git://github.com/digitalbazaar/bedrock-angular-credential.git","ssh_url":"git@github.com:digitalbazaar/bedrock-angular-credential.git","clone_url":"https://github.com/digitalbazaar/bedrock-angular-credential.git","svn_url":"https://github.com/digitalbazaar/bedrock-angular-credential","homepage":null,"size":74,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/pulls/4"},"html":{"href":"https://github.com/digitalbazaar/bedrock-angular-credential/pull/4"},"issue":{"href":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/issues/4"},"comments":{"href":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/digitalbazaar/bedrock-angular-credential/statuses/c324a301f91e1440b07e21fc2b61208c27e63584"}}}}