{"action":"created","comment":{"url":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/pulls/comments/64282207","id":64282207,"diff_hunk":"@@ -824,18 +835,26 @@ var deleteAsset = module.exports.deleteAsset = function(ctx, id, callback) {\n     return callback({'code': 400, 'msg': validationResult.error.details[0].message});\n   }\n \n-  // Only course instructors are allowed to delete an asset\n-  if (!ctx.user.is_admin) {\n-    log.error({'id': id}, 'Unauthorized to delete an asset');\n-    return callback({'code': 401, 'msg': 'Unauthorized to delete an asset'});\n-  }\n-\n   // Retrieve the asset that is being deleted\n-  getAsset(ctx, id, null, function(err, asset) {\n+  var opts = {\n+    'includeWhiteboardUsages': true\n+  };\n+  getAsset(ctx, id, opts, function(err, asset) {\n     if (err) {\n       return callback(err);\n     }\n \n+    // If an asset has no interactions, associated users may delete that asset. Other assets may be deleted\n+    // only by course instructors","path":"node_modules/col-assets/lib/api.js","position":64,"original_position":64,"commit_id":"dc872adc0cc3f9f712b9817eff5d3308d9a8d3a1","original_commit_id":"dc872adc0cc3f9f712b9817eff5d3308d9a8d3a1","user":{"login":"nicolaasmatthijs","id":109850,"avatar_url":"https://avatars.githubusercontent.com/u/109850?v=3","gravatar_id":"","url":"https://api.github.com/users/nicolaasmatthijs","html_url":"https://github.com/nicolaasmatthijs","followers_url":"https://api.github.com/users/nicolaasmatthijs/followers","following_url":"https://api.github.com/users/nicolaasmatthijs/following{/other_user}","gists_url":"https://api.github.com/users/nicolaasmatthijs/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolaasmatthijs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolaasmatthijs/subscriptions","organizations_url":"https://api.github.com/users/nicolaasmatthijs/orgs","repos_url":"https://api.github.com/users/nicolaasmatthijs/repos","events_url":"https://api.github.com/users/nicolaasmatthijs/events{/privacy}","received_events_url":"https://api.github.com/users/nicolaasmatthijs/received_events","type":"User","site_admin":false},"body":"I think we refer to them as `course administrators` elsewhere","created_at":"2016-05-23T20:23:51Z","updated_at":"2016-05-23T20:23:51Z","html_url":"https://github.com/ets-berkeley-edu/collabosphere/pull/134#discussion_r64282207","pull_request_url":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/pulls/134","_links":{"self":{"href":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/pulls/comments/64282207"},"html":{"href":"https://github.com/ets-berkeley-edu/collabosphere/pull/134#discussion_r64282207"},"pull_request":{"href":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/pulls/134"}}},"pull_request":{"url":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/pulls/134","id":71111934,"html_url":"https://github.com/ets-berkeley-edu/collabosphere/pull/134","diff_url":"https://github.com/ets-berkeley-edu/collabosphere/pull/134.diff","patch_url":"https://github.com/ets-berkeley-edu/collabosphere/pull/134.patch","issue_url":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/issues/134","number":134,"state":"open","locked":false,"title":"COL-378 Allow non-admin users to delete associated assets with no interactions","user":{"login":"paulkerschen","id":2413467,"avatar_url":"https://avatars.githubusercontent.com/u/2413467?v=3","gravatar_id":"","url":"https://api.github.com/users/paulkerschen","html_url":"https://github.com/paulkerschen","followers_url":"https://api.github.com/users/paulkerschen/followers","following_url":"https://api.github.com/users/paulkerschen/following{/other_user}","gists_url":"https://api.github.com/users/paulkerschen/gists{/gist_id}","starred_url":"https://api.github.com/users/paulkerschen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulkerschen/subscriptions","organizations_url":"https://api.github.com/users/paulkerschen/orgs","repos_url":"https://api.github.com/users/paulkerschen/repos","events_url":"https://api.github.com/users/paulkerschen/events{/privacy}","received_events_url":"https://api.github.com/users/paulkerschen/received_events","type":"User","site_admin":false},"body":"https://jira.ets.berkeley.edu/jira/browse/COL-378","created_at":"2016-05-23T20:04:11Z","updated_at":"2016-05-23T20:23:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6067e0e5a5d75867398583817733b56916d52196","assignee":{"login":"nicolaasmatthijs","id":109850,"avatar_url":"https://avatars.githubusercontent.com/u/109850?v=3","gravatar_id":"","url":"https://api.github.com/users/nicolaasmatthijs","html_url":"https://github.com/nicolaasmatthijs","followers_url":"https://api.github.com/users/nicolaasmatthijs/followers","following_url":"https://api.github.com/users/nicolaasmatthijs/following{/other_user}","gists_url":"https://api.github.com/users/nicolaasmatthijs/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolaasmatthijs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolaasmatthijs/subscriptions","organizations_url":"https://api.github.com/users/nicolaasmatthijs/orgs","repos_url":"https://api.github.com/users/nicolaasmatthijs/repos","events_url":"https://api.github.com/users/nicolaasmatthijs/events{/privacy}","received_events_url":"https://api.github.com/users/nicolaasmatthijs/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/pulls/134/commits","review_comments_url":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/pulls/134/comments","review_comment_url":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/issues/134/comments","statuses_url":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/statuses/dc872adc0cc3f9f712b9817eff5d3308d9a8d3a1","head":{"label":"paulkerschen:col-378","ref":"col-378","sha":"dc872adc0cc3f9f712b9817eff5d3308d9a8d3a1","user":{"login":"paulkerschen","id":2413467,"avatar_url":"https://avatars.githubusercontent.com/u/2413467?v=3","gravatar_id":"","url":"https://api.github.com/users/paulkerschen","html_url":"https://github.com/paulkerschen","followers_url":"https://api.github.com/users/paulkerschen/followers","following_url":"https://api.github.com/users/paulkerschen/following{/other_user}","gists_url":"https://api.github.com/users/paulkerschen/gists{/gist_id}","starred_url":"https://api.github.com/users/paulkerschen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulkerschen/subscriptions","organizations_url":"https://api.github.com/users/paulkerschen/orgs","repos_url":"https://api.github.com/users/paulkerschen/repos","events_url":"https://api.github.com/users/paulkerschen/events{/privacy}","received_events_url":"https://api.github.com/users/paulkerschen/received_events","type":"User","site_admin":false},"repo":{"id":59068710,"name":"collabosphere","full_name":"paulkerschen/collabosphere","owner":{"login":"paulkerschen","id":2413467,"avatar_url":"https://avatars.githubusercontent.com/u/2413467?v=3","gravatar_id":"","url":"https://api.github.com/users/paulkerschen","html_url":"https://github.com/paulkerschen","followers_url":"https://api.github.com/users/paulkerschen/followers","following_url":"https://api.github.com/users/paulkerschen/following{/other_user}","gists_url":"https://api.github.com/users/paulkerschen/gists{/gist_id}","starred_url":"https://api.github.com/users/paulkerschen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulkerschen/subscriptions","organizations_url":"https://api.github.com/users/paulkerschen/orgs","repos_url":"https://api.github.com/users/paulkerschen/repos","events_url":"https://api.github.com/users/paulkerschen/events{/privacy}","received_events_url":"https://api.github.com/users/paulkerschen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/paulkerschen/collabosphere","description":"","fork":true,"url":"https://api.github.com/repos/paulkerschen/collabosphere","forks_url":"https://api.github.com/repos/paulkerschen/collabosphere/forks","keys_url":"https://api.github.com/repos/paulkerschen/collabosphere/keys{/key_id}","collaborators_url":"https://api.github.com/repos/paulkerschen/collabosphere/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/paulkerschen/collabosphere/teams","hooks_url":"https://api.github.com/repos/paulkerschen/collabosphere/hooks","issue_events_url":"https://api.github.com/repos/paulkerschen/collabosphere/issues/events{/number}","events_url":"https://api.github.com/repos/paulkerschen/collabosphere/events","assignees_url":"https://api.github.com/repos/paulkerschen/collabosphere/assignees{/user}","branches_url":"https://api.github.com/repos/paulkerschen/collabosphere/branches{/branch}","tags_url":"https://api.github.com/repos/paulkerschen/collabosphere/tags","blobs_url":"https://api.github.com/repos/paulkerschen/collabosphere/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/paulkerschen/collabosphere/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/paulkerschen/collabosphere/git/refs{/sha}","trees_url":"https://api.github.com/repos/paulkerschen/collabosphere/git/trees{/sha}","statuses_url":"https://api.github.com/repos/paulkerschen/collabosphere/statuses/{sha}","languages_url":"https://api.github.com/repos/paulkerschen/collabosphere/languages","stargazers_url":"https://api.github.com/repos/paulkerschen/collabosphere/stargazers","contributors_url":"https://api.github.com/repos/paulkerschen/collabosphere/contributors","subscribers_url":"https://api.github.com/repos/paulkerschen/collabosphere/subscribers","subscription_url":"https://api.github.com/repos/paulkerschen/collabosphere/subscription","commits_url":"https://api.github.com/repos/paulkerschen/collabosphere/commits{/sha}","git_commits_url":"https://api.github.com/repos/paulkerschen/collabosphere/git/commits{/sha}","comments_url":"https://api.github.com/repos/paulkerschen/collabosphere/comments{/number}","issue_comment_url":"https://api.github.com/repos/paulkerschen/collabosphere/issues/comments{/number}","contents_url":"https://api.github.com/repos/paulkerschen/collabosphere/contents/{+path}","compare_url":"https://api.github.com/repos/paulkerschen/collabosphere/compare/{base}...{head}","merges_url":"https://api.github.com/repos/paulkerschen/collabosphere/merges","archive_url":"https://api.github.com/repos/paulkerschen/collabosphere/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/paulkerschen/collabosphere/downloads","issues_url":"https://api.github.com/repos/paulkerschen/collabosphere/issues{/number}","pulls_url":"https://api.github.com/repos/paulkerschen/collabosphere/pulls{/number}","milestones_url":"https://api.github.com/repos/paulkerschen/collabosphere/milestones{/number}","notifications_url":"https://api.github.com/repos/paulkerschen/collabosphere/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/paulkerschen/collabosphere/labels{/name}","releases_url":"https://api.github.com/repos/paulkerschen/collabosphere/releases{/id}","deployments_url":"https://api.github.com/repos/paulkerschen/collabosphere/deployments","created_at":"2016-05-18T00:27:39Z","updated_at":"2016-05-18T00:27:40Z","pushed_at":"2016-05-23T20:13:16Z","git_url":"git://github.com/paulkerschen/collabosphere.git","ssh_url":"git@github.com:paulkerschen/collabosphere.git","clone_url":"https://github.com/paulkerschen/collabosphere.git","svn_url":"https://github.com/paulkerschen/collabosphere","homepage":null,"size":4784,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"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":0,"default_branch":"master"}},"base":{"label":"ets-berkeley-edu:master","ref":"master","sha":"74d63b5d089105d8e72bb9c68643a84432ab8e3e","user":{"login":"ets-berkeley-edu","id":283538,"avatar_url":"https://avatars.githubusercontent.com/u/283538?v=3","gravatar_id":"","url":"https://api.github.com/users/ets-berkeley-edu","html_url":"https://github.com/ets-berkeley-edu","followers_url":"https://api.github.com/users/ets-berkeley-edu/followers","following_url":"https://api.github.com/users/ets-berkeley-edu/following{/other_user}","gists_url":"https://api.github.com/users/ets-berkeley-edu/gists{/gist_id}","starred_url":"https://api.github.com/users/ets-berkeley-edu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ets-berkeley-edu/subscriptions","organizations_url":"https://api.github.com/users/ets-berkeley-edu/orgs","repos_url":"https://api.github.com/users/ets-berkeley-edu/repos","events_url":"https://api.github.com/users/ets-berkeley-edu/events{/privacy}","received_events_url":"https://api.github.com/users/ets-berkeley-edu/received_events","type":"Organization","site_admin":false},"repo":{"id":30094168,"name":"collabosphere","full_name":"ets-berkeley-edu/collabosphere","owner":{"login":"ets-berkeley-edu","id":283538,"avatar_url":"https://avatars.githubusercontent.com/u/283538?v=3","gravatar_id":"","url":"https://api.github.com/users/ets-berkeley-edu","html_url":"https://github.com/ets-berkeley-edu","followers_url":"https://api.github.com/users/ets-berkeley-edu/followers","following_url":"https://api.github.com/users/ets-berkeley-edu/following{/other_user}","gists_url":"https://api.github.com/users/ets-berkeley-edu/gists{/gist_id}","starred_url":"https://api.github.com/users/ets-berkeley-edu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ets-berkeley-edu/subscriptions","organizations_url":"https://api.github.com/users/ets-berkeley-edu/orgs","repos_url":"https://api.github.com/users/ets-berkeley-edu/repos","events_url":"https://api.github.com/users/ets-berkeley-edu/events{/privacy}","received_events_url":"https://api.github.com/users/ets-berkeley-edu/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ets-berkeley-edu/collabosphere","description":"","fork":false,"url":"https://api.github.com/repos/ets-berkeley-edu/collabosphere","forks_url":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/forks","keys_url":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/teams","hooks_url":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/hooks","issue_events_url":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/issues/events{/number}","events_url":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/events","assignees_url":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/assignees{/user}","branches_url":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/branches{/branch}","tags_url":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/tags","blobs_url":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/git/refs{/sha}","trees_url":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/statuses/{sha}","languages_url":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/languages","stargazers_url":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/stargazers","contributors_url":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/contributors","subscribers_url":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/subscribers","subscription_url":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/subscription","commits_url":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/commits{/sha}","git_commits_url":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/git/commits{/sha}","comments_url":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/comments{/number}","issue_comment_url":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/issues/comments{/number}","contents_url":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/contents/{+path}","compare_url":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/merges","archive_url":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/downloads","issues_url":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/issues{/number}","pulls_url":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/pulls{/number}","milestones_url":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/milestones{/number}","notifications_url":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/labels{/name}","releases_url":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/releases{/id}","deployments_url":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/deployments","created_at":"2015-01-30T22:46:30Z","updated_at":"2016-04-22T18:56:45Z","pushed_at":"2016-05-23T20:13:16Z","git_url":"git://github.com/ets-berkeley-edu/collabosphere.git","ssh_url":"git@github.com:ets-berkeley-edu/collabosphere.git","clone_url":"https://github.com/ets-berkeley-edu/collabosphere.git","svn_url":"https://github.com/ets-berkeley-edu/collabosphere","homepage":null,"size":4802,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":7,"forks":1,"open_issues":7,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/pulls/134"},"html":{"href":"https://github.com/ets-berkeley-edu/collabosphere/pull/134"},"issue":{"href":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/issues/134"},"comments":{"href":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/issues/134/comments"},"review_comments":{"href":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/pulls/134/comments"},"review_comment":{"href":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/pulls/134/commits"},"statuses":{"href":"https://api.github.com/repos/ets-berkeley-edu/collabosphere/statuses/dc872adc0cc3f9f712b9817eff5d3308d9a8d3a1"}}}}
{"actor":{"display_login":"nicolaasmatthijs"}}