{"action":"created","comment":{"url":"https://api.github.com/repos/inveniosoftware/invenio-accounts/pulls/comments/51852233","id":51852233,"diff_hunk":"@@ -0,0 +1,56 @@\n+# -*- coding: utf-8 -*-\n+#\n+# This file is part of Invenio.\n+# Copyright (C) 2016 CERN.\n+#\n+# Invenio is free software; you can redistribute it\n+# and/or modify it under the terms of the GNU General Public License as\n+# published by the Free Software Foundation; either version 2 of the\n+# License, or (at your option) any later version.\n+#\n+# Invenio is distributed in the hope that it will be\n+# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of\n+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+# General Public License for more details.\n+#\n+# You should have received a copy of the GNU General Public License\n+# along with Invenio; if not, write to the\n+# Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,\n+# MA 02111-1307, USA.\n+#\n+# In applying this license, CERN does not\n+# waive the privileges and immunities granted to it by virtue of its status\n+# as an Intergovernmental Organization or submit itself to any jurisdiction.\n+\n+\"\"\"Additional non-userprofile fields used during registration.\n+\n+Currently supported: recaptcha\n+\"\"\"\n+from flask_wtf import Form, RecaptchaField\n+from wtforms import FormField, StringField, SubmitField\n+\n+\n+class RegistrationFormRecaptcha(Form):\n+    \"\"\"Form for editing user profile.\"\"\"\n+\n+    recaptcha = RecaptchaField()\n+\n+\n+def confirm_register_form_factory(Form, current_app):\n+    \"\"\"Return confirmation for extended registration form.\"\"\"\n+    class ConfirmRegisterForm(Form):\n+        if current_app.config.get(\"RECAPTCHA_PUBLIC_KEY\") and \\","path":"invenio_accounts/forms.py","position":42,"original_position":42,"commit_id":"de036a2c271d6a879d8c3da3d885dbb936b02afa","original_commit_id":"de036a2c271d6a879d8c3da3d885dbb936b02afa","user":{"login":"jirikuncar","id":189798,"avatar_url":"https://avatars.githubusercontent.com/u/189798?v=3","gravatar_id":"","url":"https://api.github.com/users/jirikuncar","html_url":"https://github.com/jirikuncar","followers_url":"https://api.github.com/users/jirikuncar/followers","following_url":"https://api.github.com/users/jirikuncar/following{/other_user}","gists_url":"https://api.github.com/users/jirikuncar/gists{/gist_id}","starred_url":"https://api.github.com/users/jirikuncar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jirikuncar/subscriptions","organizations_url":"https://api.github.com/users/jirikuncar/orgs","repos_url":"https://api.github.com/users/jirikuncar/repos","events_url":"https://api.github.com/users/jirikuncar/events{/privacy}","received_events_url":"https://api.github.com/users/jirikuncar/received_events","type":"User","site_admin":false},"body":"The position of condition is not correct. You should return untouched `Form` if recaptcha is not configured.","created_at":"2016-02-04T10:10:41Z","updated_at":"2016-02-04T10:10:41Z","html_url":"https://github.com/inveniosoftware/invenio-accounts/pull/111#discussion_r51852233","pull_request_url":"https://api.github.com/repos/inveniosoftware/invenio-accounts/pulls/111","_links":{"self":{"href":"https://api.github.com/repos/inveniosoftware/invenio-accounts/pulls/comments/51852233"},"html":{"href":"https://github.com/inveniosoftware/invenio-accounts/pull/111#discussion_r51852233"},"pull_request":{"href":"https://api.github.com/repos/inveniosoftware/invenio-accounts/pulls/111"}}},"pull_request":{"url":"https://api.github.com/repos/inveniosoftware/invenio-accounts/pulls/111","id":58164619,"html_url":"https://github.com/inveniosoftware/invenio-accounts/pull/111","diff_url":"https://github.com/inveniosoftware/invenio-accounts/pull/111.diff","patch_url":"https://github.com/inveniosoftware/invenio-accounts/pull/111.patch","issue_url":"https://api.github.com/repos/inveniosoftware/invenio-accounts/issues/111","number":111,"state":"open","locked":false,"title":"global: optional recaptcha in registration","user":{"login":"bruno314","id":3518813,"avatar_url":"https://avatars.githubusercontent.com/u/3518813?v=3","gravatar_id":"","url":"https://api.github.com/users/bruno314","html_url":"https://github.com/bruno314","followers_url":"https://api.github.com/users/bruno314/followers","following_url":"https://api.github.com/users/bruno314/following{/other_user}","gists_url":"https://api.github.com/users/bruno314/gists{/gist_id}","starred_url":"https://api.github.com/users/bruno314/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bruno314/subscriptions","organizations_url":"https://api.github.com/users/bruno314/orgs","repos_url":"https://api.github.com/users/bruno314/repos","events_url":"https://api.github.com/users/bruno314/events{/privacy}","received_events_url":"https://api.github.com/users/bruno314/received_events","type":"User","site_admin":false},"body":"* Adds optional recaptcha field into registration form.\r\n\r\nSigned-off-by: Bruno Cuc <bruno.cuc@cern.ch>","created_at":"2016-02-03T16:43:53Z","updated_at":"2016-02-04T10:10:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9892a28941446a8b89564f79f95ecc8d00220430","assignee":{"login":"bruno314","id":3518813,"avatar_url":"https://avatars.githubusercontent.com/u/3518813?v=3","gravatar_id":"","url":"https://api.github.com/users/bruno314","html_url":"https://github.com/bruno314","followers_url":"https://api.github.com/users/bruno314/followers","following_url":"https://api.github.com/users/bruno314/following{/other_user}","gists_url":"https://api.github.com/users/bruno314/gists{/gist_id}","starred_url":"https://api.github.com/users/bruno314/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bruno314/subscriptions","organizations_url":"https://api.github.com/users/bruno314/orgs","repos_url":"https://api.github.com/users/bruno314/repos","events_url":"https://api.github.com/users/bruno314/events{/privacy}","received_events_url":"https://api.github.com/users/bruno314/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/inveniosoftware/invenio-accounts/milestones/7","html_url":"https://github.com/inveniosoftware/invenio-accounts/milestones/v1.0.0","labels_url":"https://api.github.com/repos/inveniosoftware/invenio-accounts/milestones/7/labels","id":1355017,"number":7,"title":"v1.0.0","description":null,"creator":{"login":"jirikuncar","id":189798,"avatar_url":"https://avatars.githubusercontent.com/u/189798?v=3","gravatar_id":"","url":"https://api.github.com/users/jirikuncar","html_url":"https://github.com/jirikuncar","followers_url":"https://api.github.com/users/jirikuncar/followers","following_url":"https://api.github.com/users/jirikuncar/following{/other_user}","gists_url":"https://api.github.com/users/jirikuncar/gists{/gist_id}","starred_url":"https://api.github.com/users/jirikuncar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jirikuncar/subscriptions","organizations_url":"https://api.github.com/users/jirikuncar/orgs","repos_url":"https://api.github.com/users/jirikuncar/repos","events_url":"https://api.github.com/users/jirikuncar/events{/privacy}","received_events_url":"https://api.github.com/users/jirikuncar/received_events","type":"User","site_admin":false},"open_issues":10,"closed_issues":75,"state":"open","created_at":"2015-10-14T09:57:22Z","updated_at":"2016-02-04T08:19:28Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/inveniosoftware/invenio-accounts/pulls/111/commits","review_comments_url":"https://api.github.com/repos/inveniosoftware/invenio-accounts/pulls/111/comments","review_comment_url":"https://api.github.com/repos/inveniosoftware/invenio-accounts/pulls/comments{/number}","comments_url":"https://api.github.com/repos/inveniosoftware/invenio-accounts/issues/111/comments","statuses_url":"https://api.github.com/repos/inveniosoftware/invenio-accounts/statuses/de036a2c271d6a879d8c3da3d885dbb936b02afa","head":{"label":"bruno314:re","ref":"re","sha":"de036a2c271d6a879d8c3da3d885dbb936b02afa","user":{"login":"bruno314","id":3518813,"avatar_url":"https://avatars.githubusercontent.com/u/3518813?v=3","gravatar_id":"","url":"https://api.github.com/users/bruno314","html_url":"https://github.com/bruno314","followers_url":"https://api.github.com/users/bruno314/followers","following_url":"https://api.github.com/users/bruno314/following{/other_user}","gists_url":"https://api.github.com/users/bruno314/gists{/gist_id}","starred_url":"https://api.github.com/users/bruno314/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bruno314/subscriptions","organizations_url":"https://api.github.com/users/bruno314/orgs","repos_url":"https://api.github.com/users/bruno314/repos","events_url":"https://api.github.com/users/bruno314/events{/privacy}","received_events_url":"https://api.github.com/users/bruno314/received_events","type":"User","site_admin":false},"repo":{"id":50980131,"name":"invenio-accounts","full_name":"bruno314/invenio-accounts","owner":{"login":"bruno314","id":3518813,"avatar_url":"https://avatars.githubusercontent.com/u/3518813?v=3","gravatar_id":"","url":"https://api.github.com/users/bruno314","html_url":"https://github.com/bruno314","followers_url":"https://api.github.com/users/bruno314/followers","following_url":"https://api.github.com/users/bruno314/following{/other_user}","gists_url":"https://api.github.com/users/bruno314/gists{/gist_id}","starred_url":"https://api.github.com/users/bruno314/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bruno314/subscriptions","organizations_url":"https://api.github.com/users/bruno314/orgs","repos_url":"https://api.github.com/users/bruno314/repos","events_url":"https://api.github.com/users/bruno314/events{/privacy}","received_events_url":"https://api.github.com/users/bruno314/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bruno314/invenio-accounts","description":"Invenio module for managing user accounts.","fork":true,"url":"https://api.github.com/repos/bruno314/invenio-accounts","forks_url":"https://api.github.com/repos/bruno314/invenio-accounts/forks","keys_url":"https://api.github.com/repos/bruno314/invenio-accounts/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bruno314/invenio-accounts/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bruno314/invenio-accounts/teams","hooks_url":"https://api.github.com/repos/bruno314/invenio-accounts/hooks","issue_events_url":"https://api.github.com/repos/bruno314/invenio-accounts/issues/events{/number}","events_url":"https://api.github.com/repos/bruno314/invenio-accounts/events","assignees_url":"https://api.github.com/repos/bruno314/invenio-accounts/assignees{/user}","branches_url":"https://api.github.com/repos/bruno314/invenio-accounts/branches{/branch}","tags_url":"https://api.github.com/repos/bruno314/invenio-accounts/tags","blobs_url":"https://api.github.com/repos/bruno314/invenio-accounts/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bruno314/invenio-accounts/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bruno314/invenio-accounts/git/refs{/sha}","trees_url":"https://api.github.com/repos/bruno314/invenio-accounts/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bruno314/invenio-accounts/statuses/{sha}","languages_url":"https://api.github.com/repos/bruno314/invenio-accounts/languages","stargazers_url":"https://api.github.com/repos/bruno314/invenio-accounts/stargazers","contributors_url":"https://api.github.com/repos/bruno314/invenio-accounts/contributors","subscribers_url":"https://api.github.com/repos/bruno314/invenio-accounts/subscribers","subscription_url":"https://api.github.com/repos/bruno314/invenio-accounts/subscription","commits_url":"https://api.github.com/repos/bruno314/invenio-accounts/commits{/sha}","git_commits_url":"https://api.github.com/repos/bruno314/invenio-accounts/git/commits{/sha}","comments_url":"https://api.github.com/repos/bruno314/invenio-accounts/comments{/number}","issue_comment_url":"https://api.github.com/repos/bruno314/invenio-accounts/issues/comments{/number}","contents_url":"https://api.github.com/repos/bruno314/invenio-accounts/contents/{+path}","compare_url":"https://api.github.com/repos/bruno314/invenio-accounts/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bruno314/invenio-accounts/merges","archive_url":"https://api.github.com/repos/bruno314/invenio-accounts/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bruno314/invenio-accounts/downloads","issues_url":"https://api.github.com/repos/bruno314/invenio-accounts/issues{/number}","pulls_url":"https://api.github.com/repos/bruno314/invenio-accounts/pulls{/number}","milestones_url":"https://api.github.com/repos/bruno314/invenio-accounts/milestones{/number}","notifications_url":"https://api.github.com/repos/bruno314/invenio-accounts/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bruno314/invenio-accounts/labels{/name}","releases_url":"https://api.github.com/repos/bruno314/invenio-accounts/releases{/id}","deployments_url":"https://api.github.com/repos/bruno314/invenio-accounts/deployments","created_at":"2016-02-03T06:46:23Z","updated_at":"2016-02-03T06:46:24Z","pushed_at":"2016-02-04T09:55:47Z","git_url":"git://github.com/bruno314/invenio-accounts.git","ssh_url":"git@github.com:bruno314/invenio-accounts.git","clone_url":"https://github.com/bruno314/invenio-accounts.git","svn_url":"https://github.com/bruno314/invenio-accounts","homepage":"","size":1184,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"inveniosoftware:master","ref":"master","sha":"a3cacfdc645567eec382310f32579b92868b095a","user":{"login":"inveniosoftware","id":1157480,"avatar_url":"https://avatars.githubusercontent.com/u/1157480?v=3","gravatar_id":"","url":"https://api.github.com/users/inveniosoftware","html_url":"https://github.com/inveniosoftware","followers_url":"https://api.github.com/users/inveniosoftware/followers","following_url":"https://api.github.com/users/inveniosoftware/following{/other_user}","gists_url":"https://api.github.com/users/inveniosoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/inveniosoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inveniosoftware/subscriptions","organizations_url":"https://api.github.com/users/inveniosoftware/orgs","repos_url":"https://api.github.com/users/inveniosoftware/repos","events_url":"https://api.github.com/users/inveniosoftware/events{/privacy}","received_events_url":"https://api.github.com/users/inveniosoftware/received_events","type":"Organization","site_admin":false},"repo":{"id":35280261,"name":"invenio-accounts","full_name":"inveniosoftware/invenio-accounts","owner":{"login":"inveniosoftware","id":1157480,"avatar_url":"https://avatars.githubusercontent.com/u/1157480?v=3","gravatar_id":"","url":"https://api.github.com/users/inveniosoftware","html_url":"https://github.com/inveniosoftware","followers_url":"https://api.github.com/users/inveniosoftware/followers","following_url":"https://api.github.com/users/inveniosoftware/following{/other_user}","gists_url":"https://api.github.com/users/inveniosoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/inveniosoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inveniosoftware/subscriptions","organizations_url":"https://api.github.com/users/inveniosoftware/orgs","repos_url":"https://api.github.com/users/inveniosoftware/repos","events_url":"https://api.github.com/users/inveniosoftware/events{/privacy}","received_events_url":"https://api.github.com/users/inveniosoftware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/inveniosoftware/invenio-accounts","description":"Invenio module for managing user accounts.","fork":false,"url":"https://api.github.com/repos/inveniosoftware/invenio-accounts","forks_url":"https://api.github.com/repos/inveniosoftware/invenio-accounts/forks","keys_url":"https://api.github.com/repos/inveniosoftware/invenio-accounts/keys{/key_id}","collaborators_url":"https://api.github.com/repos/inveniosoftware/invenio-accounts/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/inveniosoftware/invenio-accounts/teams","hooks_url":"https://api.github.com/repos/inveniosoftware/invenio-accounts/hooks","issue_events_url":"https://api.github.com/repos/inveniosoftware/invenio-accounts/issues/events{/number}","events_url":"https://api.github.com/repos/inveniosoftware/invenio-accounts/events","assignees_url":"https://api.github.com/repos/inveniosoftware/invenio-accounts/assignees{/user}","branches_url":"https://api.github.com/repos/inveniosoftware/invenio-accounts/branches{/branch}","tags_url":"https://api.github.com/repos/inveniosoftware/invenio-accounts/tags","blobs_url":"https://api.github.com/repos/inveniosoftware/invenio-accounts/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/inveniosoftware/invenio-accounts/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/inveniosoftware/invenio-accounts/git/refs{/sha}","trees_url":"https://api.github.com/repos/inveniosoftware/invenio-accounts/git/trees{/sha}","statuses_url":"https://api.github.com/repos/inveniosoftware/invenio-accounts/statuses/{sha}","languages_url":"https://api.github.com/repos/inveniosoftware/invenio-accounts/languages","stargazers_url":"https://api.github.com/repos/inveniosoftware/invenio-accounts/stargazers","contributors_url":"https://api.github.com/repos/inveniosoftware/invenio-accounts/contributors","subscribers_url":"https://api.github.com/repos/inveniosoftware/invenio-accounts/subscribers","subscription_url":"https://api.github.com/repos/inveniosoftware/invenio-accounts/subscription","commits_url":"https://api.github.com/repos/inveniosoftware/invenio-accounts/commits{/sha}","git_commits_url":"https://api.github.com/repos/inveniosoftware/invenio-accounts/git/commits{/sha}","comments_url":"https://api.github.com/repos/inveniosoftware/invenio-accounts/comments{/number}","issue_comment_url":"https://api.github.com/repos/inveniosoftware/invenio-accounts/issues/comments{/number}","contents_url":"https://api.github.com/repos/inveniosoftware/invenio-accounts/contents/{+path}","compare_url":"https://api.github.com/repos/inveniosoftware/invenio-accounts/compare/{base}...{head}","merges_url":"https://api.github.com/repos/inveniosoftware/invenio-accounts/merges","archive_url":"https://api.github.com/repos/inveniosoftware/invenio-accounts/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/inveniosoftware/invenio-accounts/downloads","issues_url":"https://api.github.com/repos/inveniosoftware/invenio-accounts/issues{/number}","pulls_url":"https://api.github.com/repos/inveniosoftware/invenio-accounts/pulls{/number}","milestones_url":"https://api.github.com/repos/inveniosoftware/invenio-accounts/milestones{/number}","notifications_url":"https://api.github.com/repos/inveniosoftware/invenio-accounts/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/inveniosoftware/invenio-accounts/labels{/name}","releases_url":"https://api.github.com/repos/inveniosoftware/invenio-accounts/releases{/id}","deployments_url":"https://api.github.com/repos/inveniosoftware/invenio-accounts/deployments","created_at":"2015-05-08T13:16:58Z","updated_at":"2016-01-15T08:09:36Z","pushed_at":"2016-02-04T09:55:47Z","git_url":"git://github.com/inveniosoftware/invenio-accounts.git","ssh_url":"git@github.com:inveniosoftware/invenio-accounts.git","clone_url":"https://github.com/inveniosoftware/invenio-accounts.git","svn_url":"https://github.com/inveniosoftware/invenio-accounts","homepage":"","size":1214,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":11,"forks":15,"open_issues":11,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/inveniosoftware/invenio-accounts/pulls/111"},"html":{"href":"https://github.com/inveniosoftware/invenio-accounts/pull/111"},"issue":{"href":"https://api.github.com/repos/inveniosoftware/invenio-accounts/issues/111"},"comments":{"href":"https://api.github.com/repos/inveniosoftware/invenio-accounts/issues/111/comments"},"review_comments":{"href":"https://api.github.com/repos/inveniosoftware/invenio-accounts/pulls/111/comments"},"review_comment":{"href":"https://api.github.com/repos/inveniosoftware/invenio-accounts/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/inveniosoftware/invenio-accounts/pulls/111/commits"},"statuses":{"href":"https://api.github.com/repos/inveniosoftware/invenio-accounts/statuses/de036a2c271d6a879d8c3da3d885dbb936b02afa"}}}}