{"action":"created","comment":{"url":"https://api.github.com/repos/oaeproject/3akai-ux/pulls/comments/30271575","id":30271575,"diff_hunk":"@@ -156,15 +160,86 @@ define(['jquery', 'oae.core'], function($, oae) {\n         };\n \n         /**\n+         * Delete a user\n+         */\n+        var deleteUser = function() {\n+            // Lock the modal so it cannot be closed while deleting the user\n+            $('#manageuser-modal', $rootel).modal('lock');\n+            $('#manageuser-actions-form .modal-footer .manageuser-actions-deleteuser button').prop('disabled', true);\n+\n+            oae.api.admin.deleteUser(widgetData.userProfile.id, function(err) {\n+                // When the delete request finishes re-enable the form\n+                $('#manageuser-modal', $rootel).modal('unlock');\n+                $('#manageuser-actions-form .modal-footer .manageuser-actions-deleteuser button').prop('disabled', false);\n+\n+                if (err) {\n+                    // Show an error notification\n+                    oae.api.util.notification(\n+                        oae.api.i18n.translate('__MSG__USER_NOT_DELETED__', 'manageuser'),\n+                        oae.api.i18n.translate('__MSG__COULD_NOT_DELETE_USER_NAME__', 'manageuser', {\n+                            'displayName': oae.api.util.security().encodeForHTML(widgetData.userProfile.displayName)\n+                        }),\n+                        'error');\n+                } else {\n+                    // Success, reload the page\n+                    document.location.reload()","path":"node_modules/oae-admin/manageuser/js/manageuser.js","position":37,"original_position":37,"commit_id":"8e65a66bac8411ef58eea4853479e24ef7312236","original_commit_id":"8e65a66bac8411ef58eea4853479e24ef7312236","user":{"login":"mrvisser","id":102265,"avatar_url":"https://avatars.githubusercontent.com/u/102265?v=3","gravatar_id":"","url":"https://api.github.com/users/mrvisser","html_url":"https://github.com/mrvisser","followers_url":"https://api.github.com/users/mrvisser/followers","following_url":"https://api.github.com/users/mrvisser/following{/other_user}","gists_url":"https://api.github.com/users/mrvisser/gists{/gist_id}","starred_url":"https://api.github.com/users/mrvisser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrvisser/subscriptions","organizations_url":"https://api.github.com/users/mrvisser/orgs","repos_url":"https://api.github.com/users/mrvisser/repos","events_url":"https://api.github.com/users/mrvisser/events{/privacy}","received_events_url":"https://api.github.com/users/mrvisser/received_events","type":"User","site_admin":false},"body":"We *could* be a bit more fancy here and do a live search reload. We would need to close the manageuser modal and then redo the search.\r\n\r\nAlso, there is a possibility that the search index hasn't been updated by the time all this happens, not exactly sure what we can do about that.","created_at":"2015-05-13T20:21:23Z","updated_at":"2015-05-13T20:21:23Z","html_url":"https://github.com/oaeproject/3akai-ux/pull/4015#discussion_r30271575","pull_request_url":"https://api.github.com/repos/oaeproject/3akai-ux/pulls/4015","_links":{"self":{"href":"https://api.github.com/repos/oaeproject/3akai-ux/pulls/comments/30271575"},"html":{"href":"https://github.com/oaeproject/3akai-ux/pull/4015#discussion_r30271575"},"pull_request":{"href":"https://api.github.com/repos/oaeproject/3akai-ux/pulls/4015"}}},"pull_request":{"url":"https://api.github.com/repos/oaeproject/3akai-ux/pulls/4015","id":35366195,"html_url":"https://github.com/oaeproject/3akai-ux/pull/4015","diff_url":"https://github.com/oaeproject/3akai-ux/pull/4015.diff","patch_url":"https://github.com/oaeproject/3akai-ux/pull/4015.patch","issue_url":"https://api.github.com/repos/oaeproject/3akai-ux/issues/4015","number":4015,"state":"open","locked":false,"title":"(UserDelete) Add ability to delete a user in user management","user":{"login":"mrvisser","id":102265,"avatar_url":"https://avatars.githubusercontent.com/u/102265?v=3","gravatar_id":"","url":"https://api.github.com/users/mrvisser","html_url":"https://github.com/mrvisser","followers_url":"https://api.github.com/users/mrvisser/followers","following_url":"https://api.github.com/users/mrvisser/following{/other_user}","gists_url":"https://api.github.com/users/mrvisser/gists{/gist_id}","starred_url":"https://api.github.com/users/mrvisser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrvisser/subscriptions","organizations_url":"https://api.github.com/users/mrvisser/orgs","repos_url":"https://api.github.com/users/mrvisser/repos","events_url":"https://api.github.com/users/mrvisser/events{/privacy}","received_events_url":"https://api.github.com/users/mrvisser/received_events","type":"User","site_admin":false},"body":null,"created_at":"2015-05-13T20:18:56Z","updated_at":"2015-05-13T20:21:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"72a866be8e751b989d906549def064f102efc2ae","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/oaeproject/3akai-ux/pulls/4015/commits","review_comments_url":"https://api.github.com/repos/oaeproject/3akai-ux/pulls/4015/comments","review_comment_url":"https://api.github.com/repos/oaeproject/3akai-ux/pulls/comments{/number}","comments_url":"https://api.github.com/repos/oaeproject/3akai-ux/issues/4015/comments","statuses_url":"https://api.github.com/repos/oaeproject/3akai-ux/statuses/8e65a66bac8411ef58eea4853479e24ef7312236","head":{"label":"mrvisser:user-delete","ref":"user-delete","sha":"8e65a66bac8411ef58eea4853479e24ef7312236","user":{"login":"mrvisser","id":102265,"avatar_url":"https://avatars.githubusercontent.com/u/102265?v=3","gravatar_id":"","url":"https://api.github.com/users/mrvisser","html_url":"https://github.com/mrvisser","followers_url":"https://api.github.com/users/mrvisser/followers","following_url":"https://api.github.com/users/mrvisser/following{/other_user}","gists_url":"https://api.github.com/users/mrvisser/gists{/gist_id}","starred_url":"https://api.github.com/users/mrvisser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrvisser/subscriptions","organizations_url":"https://api.github.com/users/mrvisser/orgs","repos_url":"https://api.github.com/users/mrvisser/repos","events_url":"https://api.github.com/users/mrvisser/events{/privacy}","received_events_url":"https://api.github.com/users/mrvisser/received_events","type":"User","site_admin":false},"repo":{"id":3808076,"name":"3akai-ux","full_name":"mrvisser/3akai-ux","owner":{"login":"mrvisser","id":102265,"avatar_url":"https://avatars.githubusercontent.com/u/102265?v=3","gravatar_id":"","url":"https://api.github.com/users/mrvisser","html_url":"https://github.com/mrvisser","followers_url":"https://api.github.com/users/mrvisser/followers","following_url":"https://api.github.com/users/mrvisser/following{/other_user}","gists_url":"https://api.github.com/users/mrvisser/gists{/gist_id}","starred_url":"https://api.github.com/users/mrvisser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrvisser/subscriptions","organizations_url":"https://api.github.com/users/mrvisser/orgs","repos_url":"https://api.github.com/users/mrvisser/repos","events_url":"https://api.github.com/users/mrvisser/events{/privacy}","received_events_url":"https://api.github.com/users/mrvisser/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mrvisser/3akai-ux","description":"Front-end development for Sakai 3","fork":true,"url":"https://api.github.com/repos/mrvisser/3akai-ux","forks_url":"https://api.github.com/repos/mrvisser/3akai-ux/forks","keys_url":"https://api.github.com/repos/mrvisser/3akai-ux/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mrvisser/3akai-ux/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mrvisser/3akai-ux/teams","hooks_url":"https://api.github.com/repos/mrvisser/3akai-ux/hooks","issue_events_url":"https://api.github.com/repos/mrvisser/3akai-ux/issues/events{/number}","events_url":"https://api.github.com/repos/mrvisser/3akai-ux/events","assignees_url":"https://api.github.com/repos/mrvisser/3akai-ux/assignees{/user}","branches_url":"https://api.github.com/repos/mrvisser/3akai-ux/branches{/branch}","tags_url":"https://api.github.com/repos/mrvisser/3akai-ux/tags","blobs_url":"https://api.github.com/repos/mrvisser/3akai-ux/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mrvisser/3akai-ux/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mrvisser/3akai-ux/git/refs{/sha}","trees_url":"https://api.github.com/repos/mrvisser/3akai-ux/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mrvisser/3akai-ux/statuses/{sha}","languages_url":"https://api.github.com/repos/mrvisser/3akai-ux/languages","stargazers_url":"https://api.github.com/repos/mrvisser/3akai-ux/stargazers","contributors_url":"https://api.github.com/repos/mrvisser/3akai-ux/contributors","subscribers_url":"https://api.github.com/repos/mrvisser/3akai-ux/subscribers","subscription_url":"https://api.github.com/repos/mrvisser/3akai-ux/subscription","commits_url":"https://api.github.com/repos/mrvisser/3akai-ux/commits{/sha}","git_commits_url":"https://api.github.com/repos/mrvisser/3akai-ux/git/commits{/sha}","comments_url":"https://api.github.com/repos/mrvisser/3akai-ux/comments{/number}","issue_comment_url":"https://api.github.com/repos/mrvisser/3akai-ux/issues/comments{/number}","contents_url":"https://api.github.com/repos/mrvisser/3akai-ux/contents/{+path}","compare_url":"https://api.github.com/repos/mrvisser/3akai-ux/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mrvisser/3akai-ux/merges","archive_url":"https://api.github.com/repos/mrvisser/3akai-ux/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mrvisser/3akai-ux/downloads","issues_url":"https://api.github.com/repos/mrvisser/3akai-ux/issues{/number}","pulls_url":"https://api.github.com/repos/mrvisser/3akai-ux/pulls{/number}","milestones_url":"https://api.github.com/repos/mrvisser/3akai-ux/milestones{/number}","notifications_url":"https://api.github.com/repos/mrvisser/3akai-ux/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mrvisser/3akai-ux/labels{/name}","releases_url":"https://api.github.com/repos/mrvisser/3akai-ux/releases{/id}","created_at":"2012-03-23T12:28:27Z","updated_at":"2015-05-13T12:36:09Z","pushed_at":"2015-05-13T20:18:38Z","git_url":"git://github.com/mrvisser/3akai-ux.git","ssh_url":"git@github.com:mrvisser/3akai-ux.git","clone_url":"https://github.com/mrvisser/3akai-ux.git","svn_url":"https://github.com/mrvisser/3akai-ux","homepage":"3akai.sakaiproject.org/dev","size":131409,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"oaeproject:master","ref":"master","sha":"b638ee2a8057c1fa991f7d03b16979d04600bea5","user":{"login":"oaeproject","id":4659912,"avatar_url":"https://avatars.githubusercontent.com/u/4659912?v=3","gravatar_id":"","url":"https://api.github.com/users/oaeproject","html_url":"https://github.com/oaeproject","followers_url":"https://api.github.com/users/oaeproject/followers","following_url":"https://api.github.com/users/oaeproject/following{/other_user}","gists_url":"https://api.github.com/users/oaeproject/gists{/gist_id}","starred_url":"https://api.github.com/users/oaeproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oaeproject/subscriptions","organizations_url":"https://api.github.com/users/oaeproject/orgs","repos_url":"https://api.github.com/users/oaeproject/repos","events_url":"https://api.github.com/users/oaeproject/events{/privacy}","received_events_url":"https://api.github.com/users/oaeproject/received_events","type":"Organization","site_admin":false},"repo":{"id":761723,"name":"3akai-ux","full_name":"oaeproject/3akai-ux","owner":{"login":"oaeproject","id":4659912,"avatar_url":"https://avatars.githubusercontent.com/u/4659912?v=3","gravatar_id":"","url":"https://api.github.com/users/oaeproject","html_url":"https://github.com/oaeproject","followers_url":"https://api.github.com/users/oaeproject/followers","following_url":"https://api.github.com/users/oaeproject/following{/other_user}","gists_url":"https://api.github.com/users/oaeproject/gists{/gist_id}","starred_url":"https://api.github.com/users/oaeproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oaeproject/subscriptions","organizations_url":"https://api.github.com/users/oaeproject/orgs","repos_url":"https://api.github.com/users/oaeproject/repos","events_url":"https://api.github.com/users/oaeproject/events{/privacy}","received_events_url":"https://api.github.com/users/oaeproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/oaeproject/3akai-ux","description":"Open Academic Environment (OAE) Front-End","fork":false,"url":"https://api.github.com/repos/oaeproject/3akai-ux","forks_url":"https://api.github.com/repos/oaeproject/3akai-ux/forks","keys_url":"https://api.github.com/repos/oaeproject/3akai-ux/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oaeproject/3akai-ux/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oaeproject/3akai-ux/teams","hooks_url":"https://api.github.com/repos/oaeproject/3akai-ux/hooks","issue_events_url":"https://api.github.com/repos/oaeproject/3akai-ux/issues/events{/number}","events_url":"https://api.github.com/repos/oaeproject/3akai-ux/events","assignees_url":"https://api.github.com/repos/oaeproject/3akai-ux/assignees{/user}","branches_url":"https://api.github.com/repos/oaeproject/3akai-ux/branches{/branch}","tags_url":"https://api.github.com/repos/oaeproject/3akai-ux/tags","blobs_url":"https://api.github.com/repos/oaeproject/3akai-ux/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oaeproject/3akai-ux/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oaeproject/3akai-ux/git/refs{/sha}","trees_url":"https://api.github.com/repos/oaeproject/3akai-ux/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oaeproject/3akai-ux/statuses/{sha}","languages_url":"https://api.github.com/repos/oaeproject/3akai-ux/languages","stargazers_url":"https://api.github.com/repos/oaeproject/3akai-ux/stargazers","contributors_url":"https://api.github.com/repos/oaeproject/3akai-ux/contributors","subscribers_url":"https://api.github.com/repos/oaeproject/3akai-ux/subscribers","subscription_url":"https://api.github.com/repos/oaeproject/3akai-ux/subscription","commits_url":"https://api.github.com/repos/oaeproject/3akai-ux/commits{/sha}","git_commits_url":"https://api.github.com/repos/oaeproject/3akai-ux/git/commits{/sha}","comments_url":"https://api.github.com/repos/oaeproject/3akai-ux/comments{/number}","issue_comment_url":"https://api.github.com/repos/oaeproject/3akai-ux/issues/comments{/number}","contents_url":"https://api.github.com/repos/oaeproject/3akai-ux/contents/{+path}","compare_url":"https://api.github.com/repos/oaeproject/3akai-ux/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oaeproject/3akai-ux/merges","archive_url":"https://api.github.com/repos/oaeproject/3akai-ux/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oaeproject/3akai-ux/downloads","issues_url":"https://api.github.com/repos/oaeproject/3akai-ux/issues{/number}","pulls_url":"https://api.github.com/repos/oaeproject/3akai-ux/pulls{/number}","milestones_url":"https://api.github.com/repos/oaeproject/3akai-ux/milestones{/number}","notifications_url":"https://api.github.com/repos/oaeproject/3akai-ux/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oaeproject/3akai-ux/labels{/name}","releases_url":"https://api.github.com/repos/oaeproject/3akai-ux/releases{/id}","created_at":"2010-07-07T12:48:50Z","updated_at":"2015-05-08T15:06:28Z","pushed_at":"2015-05-13T20:18:57Z","git_url":"git://github.com/oaeproject/3akai-ux.git","ssh_url":"git@github.com:oaeproject/3akai-ux.git","clone_url":"https://github.com/oaeproject/3akai-ux.git","svn_url":"https://github.com/oaeproject/3akai-ux","homepage":"http://www.oaeproject.org","size":173014,"stargazers_count":127,"watchers_count":127,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":224,"mirror_url":null,"open_issues_count":76,"forks":224,"open_issues":76,"watchers":127,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/oaeproject/3akai-ux/pulls/4015"},"html":{"href":"https://github.com/oaeproject/3akai-ux/pull/4015"},"issue":{"href":"https://api.github.com/repos/oaeproject/3akai-ux/issues/4015"},"comments":{"href":"https://api.github.com/repos/oaeproject/3akai-ux/issues/4015/comments"},"review_comments":{"href":"https://api.github.com/repos/oaeproject/3akai-ux/pulls/4015/comments"},"review_comment":{"href":"https://api.github.com/repos/oaeproject/3akai-ux/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/oaeproject/3akai-ux/pulls/4015/commits"},"statuses":{"href":"https://api.github.com/repos/oaeproject/3akai-ux/statuses/8e65a66bac8411ef58eea4853479e24ef7312236"}}}}