{"action":"created","comment":{"url":"https://api.github.com/repos/support-project/knowledge/pulls/comments/42303622","id":42303622,"diff_hunk":"@@ -161,15 +165,34 @@ private LdapConfigsEntity loadLdapConfig() throws InstantiationException, Illega\n \t@Post\n \t@Auth(roles=\"admin\")\n \tpublic Boundary check() throws InstantiationException, IllegalAccessException, JSONException, IOException, InvalidParamException, LdapException, InvalidKeyException, NoSuchAlgorithmException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException {\n-\t\tList<ValidateError> errors = LdapConfigsEntity.get().validate(getParams());\n-\t\tif (errors != null && !errors.isEmpty()) {\n-\t\t\tsuper.setResult(\"\", errors);\n+//\t\tMap<String, String> params = getParams();\n+//\t\tString configType = getParam(\"configType\");\n+//\t\tif (\"config2\".equals(configType)) {\n+//\t\t\tparams.put(\"host\", params.get(\"host2\"));\n+//\t\t\tparams.put(\"port\", params.get(\"port2\"));\n+//\t\t}\n+//\t\tList<ValidateError> errors = LdapConfigsEntity.get().validate(params);\n+//\t\tif (errors != null && !errors.isEmpty()) {\n+//\t\t\tsuper.setResult(\"\", errors);\n+//\t\t\treturn forward(\"config.jsp\");\n+//\t\t}\n+//\t\tLdapConfigsEntity entity = loadLdapConfig();\n+\t\t\n+\t\tLdapConfigsDao dao = LdapConfigsDao.get();\n+\t\tLdapConfigsEntity entity = dao.selectOnKey(AppConfig.get().getSystemName());\n+\t\tString configType = \"config1\";","path":"src/main/java/org/support/project/knowledge/control/admin/LdapControl.java","position":40,"original_position":40,"commit_id":"5914f3d39f34db2516f629eda427cbfbe1f581b3","original_commit_id":"5914f3d39f34db2516f629eda427cbfbe1f581b3","user":{"login":"nagodon","id":604596,"avatar_url":"https://avatars.githubusercontent.com/u/604596?v=3","gravatar_id":"","url":"https://api.github.com/users/nagodon","html_url":"https://github.com/nagodon","followers_url":"https://api.github.com/users/nagodon/followers","following_url":"https://api.github.com/users/nagodon/following{/other_user}","gists_url":"https://api.github.com/users/nagodon/gists{/gist_id}","starred_url":"https://api.github.com/users/nagodon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nagodon/subscriptions","organizations_url":"https://api.github.com/users/nagodon/orgs","repos_url":"https://api.github.com/users/nagodon/repos","events_url":"https://api.github.com/users/nagodon/events{/privacy}","received_events_url":"https://api.github.com/users/nagodon/received_events","type":"User","site_admin":false},"body":"config1,config2の文字列リテラルは定数で持っていいかなと思うのですがいかがでしょうか？","created_at":"2015-10-17T01:17:05Z","updated_at":"2015-10-17T01:17:05Z","html_url":"https://github.com/support-project/knowledge/pull/104#discussion_r42303622","pull_request_url":"https://api.github.com/repos/support-project/knowledge/pulls/104","_links":{"self":{"href":"https://api.github.com/repos/support-project/knowledge/pulls/comments/42303622"},"html":{"href":"https://github.com/support-project/knowledge/pull/104#discussion_r42303622"},"pull_request":{"href":"https://api.github.com/repos/support-project/knowledge/pulls/104"}}},"pull_request":{"url":"https://api.github.com/repos/support-project/knowledge/pulls/104","id":47963836,"html_url":"https://github.com/support-project/knowledge/pull/104","diff_url":"https://github.com/support-project/knowledge/pull/104.diff","patch_url":"https://github.com/support-project/knowledge/pull/104.patch","issue_url":"https://api.github.com/repos/support-project/knowledge/issues/104","number":104,"state":"open","locked":false,"title":"#103 LDAP設定でエラーにならないように修正","user":{"login":"koda-masaru","id":10343517,"avatar_url":"https://avatars.githubusercontent.com/u/10343517?v=3","gravatar_id":"","url":"https://api.github.com/users/koda-masaru","html_url":"https://github.com/koda-masaru","followers_url":"https://api.github.com/users/koda-masaru/followers","following_url":"https://api.github.com/users/koda-masaru/following{/other_user}","gists_url":"https://api.github.com/users/koda-masaru/gists{/gist_id}","starred_url":"https://api.github.com/users/koda-masaru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koda-masaru/subscriptions","organizations_url":"https://api.github.com/users/koda-masaru/orgs","repos_url":"https://api.github.com/users/koda-masaru/repos","events_url":"https://api.github.com/users/koda-masaru/events{/privacy}","received_events_url":"https://api.github.com/users/koda-masaru/received_events","type":"User","site_admin":false},"body":"- LDAPの設定画面で、設定1と設定2があるが、設定2を登録する場合に、設定1の「ホスト」と「ポート」を指定しないと必須入力チェックエラーになり保存できなかったので修正。\r\n\r\n- 同時に、保存時のLDAP接続チェックは、「LDAPのみでログインする」を選んだ場合のみに変更した\r\n    - LDAPのみでログインするに変更した後LDAPに接続出来ないと、誰もアクセス出来なくなってしまうのでチェックする\r\n    - DB認証を使っている場合はLDAPに接続出来なくても良いのでチェックしない\r\n\r\n- また、LDAPへの接続チェックは、「DBに保存した設定値」で実行するように変更した\r\n\r\n\r\n","created_at":"2015-10-16T21:44:38Z","updated_at":"2015-10-17T01:17:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fdb16c8c20d59cfe3f954fa804608d832f9ad019","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/support-project/knowledge/pulls/104/commits","review_comments_url":"https://api.github.com/repos/support-project/knowledge/pulls/104/comments","review_comment_url":"https://api.github.com/repos/support-project/knowledge/pulls/comments{/number}","comments_url":"https://api.github.com/repos/support-project/knowledge/issues/104/comments","statuses_url":"https://api.github.com/repos/support-project/knowledge/statuses/5914f3d39f34db2516f629eda427cbfbe1f581b3","head":{"label":"support-project:fix/issue103_ldapconfig","ref":"fix/issue103_ldapconfig","sha":"5914f3d39f34db2516f629eda427cbfbe1f581b3","user":{"login":"support-project","id":10343544,"avatar_url":"https://avatars.githubusercontent.com/u/10343544?v=3","gravatar_id":"","url":"https://api.github.com/users/support-project","html_url":"https://github.com/support-project","followers_url":"https://api.github.com/users/support-project/followers","following_url":"https://api.github.com/users/support-project/following{/other_user}","gists_url":"https://api.github.com/users/support-project/gists{/gist_id}","starred_url":"https://api.github.com/users/support-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/support-project/subscriptions","organizations_url":"https://api.github.com/users/support-project/orgs","repos_url":"https://api.github.com/users/support-project/repos","events_url":"https://api.github.com/users/support-project/events{/privacy}","received_events_url":"https://api.github.com/users/support-project/received_events","type":"Organization","site_admin":false},"repo":{"id":28609126,"name":"knowledge","full_name":"support-project/knowledge","owner":{"login":"support-project","id":10343544,"avatar_url":"https://avatars.githubusercontent.com/u/10343544?v=3","gravatar_id":"","url":"https://api.github.com/users/support-project","html_url":"https://github.com/support-project","followers_url":"https://api.github.com/users/support-project/followers","following_url":"https://api.github.com/users/support-project/following{/other_user}","gists_url":"https://api.github.com/users/support-project/gists{/gist_id}","starred_url":"https://api.github.com/users/support-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/support-project/subscriptions","organizations_url":"https://api.github.com/users/support-project/orgs","repos_url":"https://api.github.com/users/support-project/repos","events_url":"https://api.github.com/users/support-project/events{/privacy}","received_events_url":"https://api.github.com/users/support-project/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/support-project/knowledge","description":"Free Knowledge Management System","fork":false,"url":"https://api.github.com/repos/support-project/knowledge","forks_url":"https://api.github.com/repos/support-project/knowledge/forks","keys_url":"https://api.github.com/repos/support-project/knowledge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/support-project/knowledge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/support-project/knowledge/teams","hooks_url":"https://api.github.com/repos/support-project/knowledge/hooks","issue_events_url":"https://api.github.com/repos/support-project/knowledge/issues/events{/number}","events_url":"https://api.github.com/repos/support-project/knowledge/events","assignees_url":"https://api.github.com/repos/support-project/knowledge/assignees{/user}","branches_url":"https://api.github.com/repos/support-project/knowledge/branches{/branch}","tags_url":"https://api.github.com/repos/support-project/knowledge/tags","blobs_url":"https://api.github.com/repos/support-project/knowledge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/support-project/knowledge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/support-project/knowledge/git/refs{/sha}","trees_url":"https://api.github.com/repos/support-project/knowledge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/support-project/knowledge/statuses/{sha}","languages_url":"https://api.github.com/repos/support-project/knowledge/languages","stargazers_url":"https://api.github.com/repos/support-project/knowledge/stargazers","contributors_url":"https://api.github.com/repos/support-project/knowledge/contributors","subscribers_url":"https://api.github.com/repos/support-project/knowledge/subscribers","subscription_url":"https://api.github.com/repos/support-project/knowledge/subscription","commits_url":"https://api.github.com/repos/support-project/knowledge/commits{/sha}","git_commits_url":"https://api.github.com/repos/support-project/knowledge/git/commits{/sha}","comments_url":"https://api.github.com/repos/support-project/knowledge/comments{/number}","issue_comment_url":"https://api.github.com/repos/support-project/knowledge/issues/comments{/number}","contents_url":"https://api.github.com/repos/support-project/knowledge/contents/{+path}","compare_url":"https://api.github.com/repos/support-project/knowledge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/support-project/knowledge/merges","archive_url":"https://api.github.com/repos/support-project/knowledge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/support-project/knowledge/downloads","issues_url":"https://api.github.com/repos/support-project/knowledge/issues{/number}","pulls_url":"https://api.github.com/repos/support-project/knowledge/pulls{/number}","milestones_url":"https://api.github.com/repos/support-project/knowledge/milestones{/number}","notifications_url":"https://api.github.com/repos/support-project/knowledge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/support-project/knowledge/labels{/name}","releases_url":"https://api.github.com/repos/support-project/knowledge/releases{/id}","created_at":"2014-12-29T22:44:55Z","updated_at":"2015-10-09T06:57:02Z","pushed_at":"2015-10-16T21:44:39Z","git_url":"git://github.com/support-project/knowledge.git","ssh_url":"git@github.com:support-project/knowledge.git","clone_url":"https://github.com/support-project/knowledge.git","svn_url":"https://github.com/support-project/knowledge","homepage":null,"size":2081,"stargazers_count":47,"watchers_count":47,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":41,"forks":17,"open_issues":41,"watchers":47,"default_branch":"master"}},"base":{"label":"support-project:develop","ref":"develop","sha":"7669057b300a9efae0a008cfa729429f90d1de65","user":{"login":"support-project","id":10343544,"avatar_url":"https://avatars.githubusercontent.com/u/10343544?v=3","gravatar_id":"","url":"https://api.github.com/users/support-project","html_url":"https://github.com/support-project","followers_url":"https://api.github.com/users/support-project/followers","following_url":"https://api.github.com/users/support-project/following{/other_user}","gists_url":"https://api.github.com/users/support-project/gists{/gist_id}","starred_url":"https://api.github.com/users/support-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/support-project/subscriptions","organizations_url":"https://api.github.com/users/support-project/orgs","repos_url":"https://api.github.com/users/support-project/repos","events_url":"https://api.github.com/users/support-project/events{/privacy}","received_events_url":"https://api.github.com/users/support-project/received_events","type":"Organization","site_admin":false},"repo":{"id":28609126,"name":"knowledge","full_name":"support-project/knowledge","owner":{"login":"support-project","id":10343544,"avatar_url":"https://avatars.githubusercontent.com/u/10343544?v=3","gravatar_id":"","url":"https://api.github.com/users/support-project","html_url":"https://github.com/support-project","followers_url":"https://api.github.com/users/support-project/followers","following_url":"https://api.github.com/users/support-project/following{/other_user}","gists_url":"https://api.github.com/users/support-project/gists{/gist_id}","starred_url":"https://api.github.com/users/support-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/support-project/subscriptions","organizations_url":"https://api.github.com/users/support-project/orgs","repos_url":"https://api.github.com/users/support-project/repos","events_url":"https://api.github.com/users/support-project/events{/privacy}","received_events_url":"https://api.github.com/users/support-project/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/support-project/knowledge","description":"Free Knowledge Management System","fork":false,"url":"https://api.github.com/repos/support-project/knowledge","forks_url":"https://api.github.com/repos/support-project/knowledge/forks","keys_url":"https://api.github.com/repos/support-project/knowledge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/support-project/knowledge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/support-project/knowledge/teams","hooks_url":"https://api.github.com/repos/support-project/knowledge/hooks","issue_events_url":"https://api.github.com/repos/support-project/knowledge/issues/events{/number}","events_url":"https://api.github.com/repos/support-project/knowledge/events","assignees_url":"https://api.github.com/repos/support-project/knowledge/assignees{/user}","branches_url":"https://api.github.com/repos/support-project/knowledge/branches{/branch}","tags_url":"https://api.github.com/repos/support-project/knowledge/tags","blobs_url":"https://api.github.com/repos/support-project/knowledge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/support-project/knowledge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/support-project/knowledge/git/refs{/sha}","trees_url":"https://api.github.com/repos/support-project/knowledge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/support-project/knowledge/statuses/{sha}","languages_url":"https://api.github.com/repos/support-project/knowledge/languages","stargazers_url":"https://api.github.com/repos/support-project/knowledge/stargazers","contributors_url":"https://api.github.com/repos/support-project/knowledge/contributors","subscribers_url":"https://api.github.com/repos/support-project/knowledge/subscribers","subscription_url":"https://api.github.com/repos/support-project/knowledge/subscription","commits_url":"https://api.github.com/repos/support-project/knowledge/commits{/sha}","git_commits_url":"https://api.github.com/repos/support-project/knowledge/git/commits{/sha}","comments_url":"https://api.github.com/repos/support-project/knowledge/comments{/number}","issue_comment_url":"https://api.github.com/repos/support-project/knowledge/issues/comments{/number}","contents_url":"https://api.github.com/repos/support-project/knowledge/contents/{+path}","compare_url":"https://api.github.com/repos/support-project/knowledge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/support-project/knowledge/merges","archive_url":"https://api.github.com/repos/support-project/knowledge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/support-project/knowledge/downloads","issues_url":"https://api.github.com/repos/support-project/knowledge/issues{/number}","pulls_url":"https://api.github.com/repos/support-project/knowledge/pulls{/number}","milestones_url":"https://api.github.com/repos/support-project/knowledge/milestones{/number}","notifications_url":"https://api.github.com/repos/support-project/knowledge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/support-project/knowledge/labels{/name}","releases_url":"https://api.github.com/repos/support-project/knowledge/releases{/id}","created_at":"2014-12-29T22:44:55Z","updated_at":"2015-10-09T06:57:02Z","pushed_at":"2015-10-16T21:44:39Z","git_url":"git://github.com/support-project/knowledge.git","ssh_url":"git@github.com:support-project/knowledge.git","clone_url":"https://github.com/support-project/knowledge.git","svn_url":"https://github.com/support-project/knowledge","homepage":null,"size":2081,"stargazers_count":47,"watchers_count":47,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":41,"forks":17,"open_issues":41,"watchers":47,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/support-project/knowledge/pulls/104"},"html":{"href":"https://github.com/support-project/knowledge/pull/104"},"issue":{"href":"https://api.github.com/repos/support-project/knowledge/issues/104"},"comments":{"href":"https://api.github.com/repos/support-project/knowledge/issues/104/comments"},"review_comments":{"href":"https://api.github.com/repos/support-project/knowledge/pulls/104/comments"},"review_comment":{"href":"https://api.github.com/repos/support-project/knowledge/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/support-project/knowledge/pulls/104/commits"},"statuses":{"href":"https://api.github.com/repos/support-project/knowledge/statuses/5914f3d39f34db2516f629eda427cbfbe1f581b3"}}}}