{"action":"created","comment":{"url":"https://api.github.com/repos/openmrs/openmrs-module-adminui/pulls/comments/29328042","id":29328042,"diff_hunk":"@@ -0,0 +1,163 @@\n+/**\n+ * The contents of this file are subject to the OpenMRS Public License\n+ * Version 1.0 (the \"License\"); you may not use this file except in\n+ * compliance with the License. You may obtain a copy of the License at\n+ * http://license.openmrs.org\n+ *\n+ * Software distributed under the License is distributed on an \"AS IS\"\n+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the\n+ * License for the specific language governing rights and limitations\n+ * under the License.\n+ *\n+ * Copyright (C) OpenMRS, LLC.  All Rights Reserved.\n+ */\n+\n+package org.openmrs.module.adminui.page.controller.account;\n+\n+import org.openmrs.api.UserService;\n+import org.openmrs.api.context.Context;\n+import org.openmrs.messagesource.MessageSourceService;\n+import org.openmrs.module.adminui.AdminUiConstants;\n+import org.openmrs.ui.framework.annotation.BindParams;\n+import org.openmrs.ui.framework.annotation.MethodParam;\n+import org.openmrs.ui.framework.annotation.SpringBean;\n+import org.openmrs.ui.framework.page.PageModel;\n+import org.springframework.context.MessageSource;\n+import org.springframework.validation.BindingResult;\n+import org.springframework.validation.ObjectError;\n+\n+import javax.servlet.http.HttpServletRequest;\n+import java.util.List;\n+\n+public class ChangeSecretQuestionPageController {\n+\n+\tpublic String get(PageModel model) {\n+\t\treturn \"account/changeSecretQuestion\";\n+\t}\n+\n+\tpublic String post(@MethodParam(\"createSecretQuestion\") @BindParams SecretQuestion secretQuestion,\n+\t                   BindingResult errors,\n+\t                   @SpringBean(\"userService\") UserService userService,\n+\t                   @SpringBean(\"messageSourceService\") MessageSourceService messageSourceService,\n+\t                   @SpringBean(\"messageSource\") MessageSource messageSource,\n+\t                   HttpServletRequest request,\n+\t                   PageModel model) {\n+\n+\t\tvalidateSecretQuestion(secretQuestion, errors, messageSourceService);\n+\n+\t\tif (errors.hasErrors()) {\n+\t\t\tsendErrorMessage(errors, messageSource, request);\n+\t\t\tmodel.addAttribute(\"errors\", errors);","path":"omod/src/main/java/org/openmrs/module/adminui/page/controller/account/ChangeSecretQuestionPageController.java","position":50,"original_position":50,"commit_id":"b1ff0b07976dd9998dd40b995bfb18097b8376ec","original_commit_id":"26461a55b7a3359eb02d89014895617084b711b0","user":{"login":"gitahinganga","id":797382,"avatar_url":"https://avatars.githubusercontent.com/u/797382?v=3","gravatar_id":"","url":"https://api.github.com/users/gitahinganga","html_url":"https://github.com/gitahinganga","followers_url":"https://api.github.com/users/gitahinganga/followers","following_url":"https://api.github.com/users/gitahinganga/following{/other_user}","gists_url":"https://api.github.com/users/gitahinganga/gists{/gist_id}","starred_url":"https://api.github.com/users/gitahinganga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gitahinganga/subscriptions","organizations_url":"https://api.github.com/users/gitahinganga/orgs","repos_url":"https://api.github.com/users/gitahinganga/repos","events_url":"https://api.github.com/users/gitahinganga/events{/privacy}","received_events_url":"https://api.github.com/users/gitahinganga/received_events","type":"User","site_admin":false},"body":"Done.","created_at":"2015-04-29T11:43:04Z","updated_at":"2015-04-29T11:43:04Z","html_url":"https://github.com/openmrs/openmrs-module-adminui/pull/19#discussion_r29328042","pull_request_url":"https://api.github.com/repos/openmrs/openmrs-module-adminui/pulls/19","_links":{"self":{"href":"https://api.github.com/repos/openmrs/openmrs-module-adminui/pulls/comments/29328042"},"html":{"href":"https://github.com/openmrs/openmrs-module-adminui/pull/19#discussion_r29328042"},"pull_request":{"href":"https://api.github.com/repos/openmrs/openmrs-module-adminui/pulls/19"}}},"pull_request":{"url":"https://api.github.com/repos/openmrs/openmrs-module-adminui/pulls/19","id":29160139,"html_url":"https://github.com/openmrs/openmrs-module-adminui/pull/19","diff_url":"https://github.com/openmrs/openmrs-module-adminui/pull/19.diff","patch_url":"https://github.com/openmrs/openmrs-module-adminui/pull/19.patch","issue_url":"https://api.github.com/repos/openmrs/openmrs-module-adminui/issues/19","number":19,"state":"open","locked":false,"title":"Added more options to my account page","user":{"login":"gitahinganga","id":797382,"avatar_url":"https://avatars.githubusercontent.com/u/797382?v=3","gravatar_id":"","url":"https://api.github.com/users/gitahinganga","html_url":"https://github.com/gitahinganga","followers_url":"https://api.github.com/users/gitahinganga/followers","following_url":"https://api.github.com/users/gitahinganga/following{/other_user}","gists_url":"https://api.github.com/users/gitahinganga/gists{/gist_id}","starred_url":"https://api.github.com/users/gitahinganga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gitahinganga/subscriptions","organizations_url":"https://api.github.com/users/gitahinganga/orgs","repos_url":"https://api.github.com/users/gitahinganga/repos","events_url":"https://api.github.com/users/gitahinganga/events{/privacy}","received_events_url":"https://api.github.com/users/gitahinganga/received_events","type":"User","site_admin":false},"body":"Added the ability for users to change their secret question, answer and default locale settings through the new UI.","created_at":"2015-02-12T08:22:55Z","updated_at":"2015-04-29T11:43:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"168f09ae3efc758912fd86424bca6d0737d74ad0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openmrs/openmrs-module-adminui/pulls/19/commits","review_comments_url":"https://api.github.com/repos/openmrs/openmrs-module-adminui/pulls/19/comments","review_comment_url":"https://api.github.com/repos/openmrs/openmrs-module-adminui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openmrs/openmrs-module-adminui/issues/19/comments","statuses_url":"https://api.github.com/repos/openmrs/openmrs-module-adminui/statuses/b1ff0b07976dd9998dd40b995bfb18097b8376ec","head":{"label":"gitahinganga:RA-569","ref":"RA-569","sha":"b1ff0b07976dd9998dd40b995bfb18097b8376ec","user":{"login":"gitahinganga","id":797382,"avatar_url":"https://avatars.githubusercontent.com/u/797382?v=3","gravatar_id":"","url":"https://api.github.com/users/gitahinganga","html_url":"https://github.com/gitahinganga","followers_url":"https://api.github.com/users/gitahinganga/followers","following_url":"https://api.github.com/users/gitahinganga/following{/other_user}","gists_url":"https://api.github.com/users/gitahinganga/gists{/gist_id}","starred_url":"https://api.github.com/users/gitahinganga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gitahinganga/subscriptions","organizations_url":"https://api.github.com/users/gitahinganga/orgs","repos_url":"https://api.github.com/users/gitahinganga/repos","events_url":"https://api.github.com/users/gitahinganga/events{/privacy}","received_events_url":"https://api.github.com/users/gitahinganga/received_events","type":"User","site_admin":false},"repo":{"id":30108408,"name":"openmrs-module-adminui","full_name":"gitahinganga/openmrs-module-adminui","owner":{"login":"gitahinganga","id":797382,"avatar_url":"https://avatars.githubusercontent.com/u/797382?v=3","gravatar_id":"","url":"https://api.github.com/users/gitahinganga","html_url":"https://github.com/gitahinganga","followers_url":"https://api.github.com/users/gitahinganga/followers","following_url":"https://api.github.com/users/gitahinganga/following{/other_user}","gists_url":"https://api.github.com/users/gitahinganga/gists{/gist_id}","starred_url":"https://api.github.com/users/gitahinganga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gitahinganga/subscriptions","organizations_url":"https://api.github.com/users/gitahinganga/orgs","repos_url":"https://api.github.com/users/gitahinganga/repos","events_url":"https://api.github.com/users/gitahinganga/events{/privacy}","received_events_url":"https://api.github.com/users/gitahinganga/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gitahinganga/openmrs-module-adminui","description":"Administration tools for OpenMRS Reference Application","fork":true,"url":"https://api.github.com/repos/gitahinganga/openmrs-module-adminui","forks_url":"https://api.github.com/repos/gitahinganga/openmrs-module-adminui/forks","keys_url":"https://api.github.com/repos/gitahinganga/openmrs-module-adminui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gitahinganga/openmrs-module-adminui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gitahinganga/openmrs-module-adminui/teams","hooks_url":"https://api.github.com/repos/gitahinganga/openmrs-module-adminui/hooks","issue_events_url":"https://api.github.com/repos/gitahinganga/openmrs-module-adminui/issues/events{/number}","events_url":"https://api.github.com/repos/gitahinganga/openmrs-module-adminui/events","assignees_url":"https://api.github.com/repos/gitahinganga/openmrs-module-adminui/assignees{/user}","branches_url":"https://api.github.com/repos/gitahinganga/openmrs-module-adminui/branches{/branch}","tags_url":"https://api.github.com/repos/gitahinganga/openmrs-module-adminui/tags","blobs_url":"https://api.github.com/repos/gitahinganga/openmrs-module-adminui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gitahinganga/openmrs-module-adminui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gitahinganga/openmrs-module-adminui/git/refs{/sha}","trees_url":"https://api.github.com/repos/gitahinganga/openmrs-module-adminui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gitahinganga/openmrs-module-adminui/statuses/{sha}","languages_url":"https://api.github.com/repos/gitahinganga/openmrs-module-adminui/languages","stargazers_url":"https://api.github.com/repos/gitahinganga/openmrs-module-adminui/stargazers","contributors_url":"https://api.github.com/repos/gitahinganga/openmrs-module-adminui/contributors","subscribers_url":"https://api.github.com/repos/gitahinganga/openmrs-module-adminui/subscribers","subscription_url":"https://api.github.com/repos/gitahinganga/openmrs-module-adminui/subscription","commits_url":"https://api.github.com/repos/gitahinganga/openmrs-module-adminui/commits{/sha}","git_commits_url":"https://api.github.com/repos/gitahinganga/openmrs-module-adminui/git/commits{/sha}","comments_url":"https://api.github.com/repos/gitahinganga/openmrs-module-adminui/comments{/number}","issue_comment_url":"https://api.github.com/repos/gitahinganga/openmrs-module-adminui/issues/comments{/number}","contents_url":"https://api.github.com/repos/gitahinganga/openmrs-module-adminui/contents/{+path}","compare_url":"https://api.github.com/repos/gitahinganga/openmrs-module-adminui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gitahinganga/openmrs-module-adminui/merges","archive_url":"https://api.github.com/repos/gitahinganga/openmrs-module-adminui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gitahinganga/openmrs-module-adminui/downloads","issues_url":"https://api.github.com/repos/gitahinganga/openmrs-module-adminui/issues{/number}","pulls_url":"https://api.github.com/repos/gitahinganga/openmrs-module-adminui/pulls{/number}","milestones_url":"https://api.github.com/repos/gitahinganga/openmrs-module-adminui/milestones{/number}","notifications_url":"https://api.github.com/repos/gitahinganga/openmrs-module-adminui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gitahinganga/openmrs-module-adminui/labels{/name}","releases_url":"https://api.github.com/repos/gitahinganga/openmrs-module-adminui/releases{/id}","created_at":"2015-01-31T09:45:57Z","updated_at":"2015-01-31T09:45:58Z","pushed_at":"2015-04-28T07:15:34Z","git_url":"git://github.com/gitahinganga/openmrs-module-adminui.git","ssh_url":"git@github.com:gitahinganga/openmrs-module-adminui.git","clone_url":"https://github.com/gitahinganga/openmrs-module-adminui.git","svn_url":"https://github.com/gitahinganga/openmrs-module-adminui","homepage":null,"size":1500,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"openmrs:master","ref":"master","sha":"302300503d43ab67eb9286d96d2bf594249723b7","user":{"login":"openmrs","id":860776,"avatar_url":"https://avatars.githubusercontent.com/u/860776?v=3","gravatar_id":"","url":"https://api.github.com/users/openmrs","html_url":"https://github.com/openmrs","followers_url":"https://api.github.com/users/openmrs/followers","following_url":"https://api.github.com/users/openmrs/following{/other_user}","gists_url":"https://api.github.com/users/openmrs/gists{/gist_id}","starred_url":"https://api.github.com/users/openmrs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openmrs/subscriptions","organizations_url":"https://api.github.com/users/openmrs/orgs","repos_url":"https://api.github.com/users/openmrs/repos","events_url":"https://api.github.com/users/openmrs/events{/privacy}","received_events_url":"https://api.github.com/users/openmrs/received_events","type":"Organization","site_admin":false},"repo":{"id":20815099,"name":"openmrs-module-adminui","full_name":"openmrs/openmrs-module-adminui","owner":{"login":"openmrs","id":860776,"avatar_url":"https://avatars.githubusercontent.com/u/860776?v=3","gravatar_id":"","url":"https://api.github.com/users/openmrs","html_url":"https://github.com/openmrs","followers_url":"https://api.github.com/users/openmrs/followers","following_url":"https://api.github.com/users/openmrs/following{/other_user}","gists_url":"https://api.github.com/users/openmrs/gists{/gist_id}","starred_url":"https://api.github.com/users/openmrs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openmrs/subscriptions","organizations_url":"https://api.github.com/users/openmrs/orgs","repos_url":"https://api.github.com/users/openmrs/repos","events_url":"https://api.github.com/users/openmrs/events{/privacy}","received_events_url":"https://api.github.com/users/openmrs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openmrs/openmrs-module-adminui","description":"Administration tools for OpenMRS Reference Application","fork":false,"url":"https://api.github.com/repos/openmrs/openmrs-module-adminui","forks_url":"https://api.github.com/repos/openmrs/openmrs-module-adminui/forks","keys_url":"https://api.github.com/repos/openmrs/openmrs-module-adminui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openmrs/openmrs-module-adminui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openmrs/openmrs-module-adminui/teams","hooks_url":"https://api.github.com/repos/openmrs/openmrs-module-adminui/hooks","issue_events_url":"https://api.github.com/repos/openmrs/openmrs-module-adminui/issues/events{/number}","events_url":"https://api.github.com/repos/openmrs/openmrs-module-adminui/events","assignees_url":"https://api.github.com/repos/openmrs/openmrs-module-adminui/assignees{/user}","branches_url":"https://api.github.com/repos/openmrs/openmrs-module-adminui/branches{/branch}","tags_url":"https://api.github.com/repos/openmrs/openmrs-module-adminui/tags","blobs_url":"https://api.github.com/repos/openmrs/openmrs-module-adminui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openmrs/openmrs-module-adminui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openmrs/openmrs-module-adminui/git/refs{/sha}","trees_url":"https://api.github.com/repos/openmrs/openmrs-module-adminui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openmrs/openmrs-module-adminui/statuses/{sha}","languages_url":"https://api.github.com/repos/openmrs/openmrs-module-adminui/languages","stargazers_url":"https://api.github.com/repos/openmrs/openmrs-module-adminui/stargazers","contributors_url":"https://api.github.com/repos/openmrs/openmrs-module-adminui/contributors","subscribers_url":"https://api.github.com/repos/openmrs/openmrs-module-adminui/subscribers","subscription_url":"https://api.github.com/repos/openmrs/openmrs-module-adminui/subscription","commits_url":"https://api.github.com/repos/openmrs/openmrs-module-adminui/commits{/sha}","git_commits_url":"https://api.github.com/repos/openmrs/openmrs-module-adminui/git/commits{/sha}","comments_url":"https://api.github.com/repos/openmrs/openmrs-module-adminui/comments{/number}","issue_comment_url":"https://api.github.com/repos/openmrs/openmrs-module-adminui/issues/comments{/number}","contents_url":"https://api.github.com/repos/openmrs/openmrs-module-adminui/contents/{+path}","compare_url":"https://api.github.com/repos/openmrs/openmrs-module-adminui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openmrs/openmrs-module-adminui/merges","archive_url":"https://api.github.com/repos/openmrs/openmrs-module-adminui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openmrs/openmrs-module-adminui/downloads","issues_url":"https://api.github.com/repos/openmrs/openmrs-module-adminui/issues{/number}","pulls_url":"https://api.github.com/repos/openmrs/openmrs-module-adminui/pulls{/number}","milestones_url":"https://api.github.com/repos/openmrs/openmrs-module-adminui/milestones{/number}","notifications_url":"https://api.github.com/repos/openmrs/openmrs-module-adminui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openmrs/openmrs-module-adminui/labels{/name}","releases_url":"https://api.github.com/repos/openmrs/openmrs-module-adminui/releases{/id}","created_at":"2014-06-13T19:18:10Z","updated_at":"2015-02-01T18:54:41Z","pushed_at":"2015-04-28T07:15:34Z","git_url":"git://github.com/openmrs/openmrs-module-adminui.git","ssh_url":"git@github.com:openmrs/openmrs-module-adminui.git","clone_url":"https://github.com/openmrs/openmrs-module-adminui.git","svn_url":"https://github.com/openmrs/openmrs-module-adminui","homepage":null,"size":2300,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":2,"forks":9,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openmrs/openmrs-module-adminui/pulls/19"},"html":{"href":"https://github.com/openmrs/openmrs-module-adminui/pull/19"},"issue":{"href":"https://api.github.com/repos/openmrs/openmrs-module-adminui/issues/19"},"comments":{"href":"https://api.github.com/repos/openmrs/openmrs-module-adminui/issues/19/comments"},"review_comments":{"href":"https://api.github.com/repos/openmrs/openmrs-module-adminui/pulls/19/comments"},"review_comment":{"href":"https://api.github.com/repos/openmrs/openmrs-module-adminui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openmrs/openmrs-module-adminui/pulls/19/commits"},"statuses":{"href":"https://api.github.com/repos/openmrs/openmrs-module-adminui/statuses/b1ff0b07976dd9998dd40b995bfb18097b8376ec"}}}}