{"action":"created","comment":{"url":"https://api.github.com/repos/OCA/server-tools/pulls/comments/30674130","id":30674130,"diff_hunk":"@@ -0,0 +1,110 @@\n+# -*- coding: utf-8 -*-\n+##############################################################################\n+#\n+#    Author: Dhaval Patel\n+#    Copyright (C) 2011 - TODAY Denero Team. (<http://www.deneroteam.com>)\n+#\n+#    This program is free software: you can redistribute it and/or modify\n+#    it under the terms of the GNU Affero General Public License as published\n+#    by the Free Software Foundation, either version 3 of the License, or\n+#    (at your option) any later version.\n+#\n+#    This program is distributed in the hope that it will be useful,\n+#    but WITHOUT ANY WARRANTY; without even the implied warranty of\n+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+#    GNU General Public License for more details.\n+#\n+#    You should have received a copy of the GNU Affero General Public License\n+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.\n+#\n+##############################################################################\n+from openerp.osv import (\n+    osv,\n+    fields)\n+from openerp.tools.safe_eval import safe_eval\n+from openerp.tools.translate import _\n+\n+\n+class BaseConfigSettings(osv.osv_memory):\n+    _inherit = 'base.config.settings'\n+\n+    _columns = {\n+        'auth_password_min_character': fields.integer(\n+            'Minimum Password Length',\n+            help=\"Use the Minimum Password Length to determine how long the \\\n+            password should be. Set 0 if dont want to set any limit\"),\n+        'auth_password_has_capital_letter': fields.boolean(\n+            'Use capital letters',\n+            help=\"Use capital letters to determine the Capital letter that\\\n+            must be used in the password \"),\n+        'auth_password_has_digit': fields.boolean(\n+            'Use digits',\n+            help=\"Use digits to determine the digit(numaric letter)\\\n+            that must be used in the password \"),\n+        'auth_password_has_special_letter': fields.boolean(\n+            'Use Special Characters',\n+            help=\"Use special letters to determine the special letter (e.g. #,\\\n+            $,!,^, &) that must be used in the password\"),\n+    }\n+\n+    def get_default_auth_password_has_digit(self, cr, uid, fields, ctx=None):\n+        icp = self.pool.get('ir.config_parameter')\n+        return {\n+            'auth_password_min_character': safe_eval(\n+                icp.get_param(\n+                    cr,\n+                    uid,\n+                    'auth_password_settings.auth_password_min_character',\n+                    '6'\n+                )),\n+            'auth_password_has_capital_letter': safe_eval(\n+                icp.get_param(\n+                    cr,\n+                    uid,\n+                    'auth_password_settings.auth_password_has_capital_letter',\n+                    'False'\n+                )),\n+            'auth_password_has_digit': safe_eval(\n+                icp.get_param(\n+                    cr,\n+                    uid,\n+                    'auth_password_settings.auth_password_has_digit',\n+                    'False'\n+                )),\n+            'auth_password_has_special_letter': safe_eval(\n+                icp.get_param(\n+                    cr,\n+                    uid,\n+                    'auth_password_settings.auth_password_has_special_letter',\n+                    'False'\n+                )),\n+        }\n+\n+    def set_auth_password_has_digit(self, cr, uid, ids, context=None):\n+        config = self.browse(cr, uid, ids[0], context=context)\n+        if (config.auth_password_min_character < 5):\n+            raise osv.except_osv(\n+                _('Error!'),","path":"auth_password_settings/models/res_config.py","position":87,"original_position":87,"commit_id":"442ea75aa20fff640a6738c49d3461517b509265","original_commit_id":"442ea75aa20fff640a6738c49d3461517b509265","user":{"login":"gurneyalex","id":2032807,"avatar_url":"https://avatars.githubusercontent.com/u/2032807?v=3","gravatar_id":"","url":"https://api.github.com/users/gurneyalex","html_url":"https://github.com/gurneyalex","followers_url":"https://api.github.com/users/gurneyalex/followers","following_url":"https://api.github.com/users/gurneyalex/following{/other_user}","gists_url":"https://api.github.com/users/gurneyalex/gists{/gist_id}","starred_url":"https://api.github.com/users/gurneyalex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gurneyalex/subscriptions","organizations_url":"https://api.github.com/users/gurneyalex/orgs","repos_url":"https://api.github.com/users/gurneyalex/repos","events_url":"https://api.github.com/users/gurneyalex/events{/privacy}","received_events_url":"https://api.github.com/users/gurneyalex/received_events","type":"User","site_admin":false},"body":"Remove the exclamation mark. ","created_at":"2015-05-20T06:31:49Z","updated_at":"2015-05-20T06:31:49Z","html_url":"https://github.com/OCA/server-tools/pull/162#discussion_r30674130","pull_request_url":"https://api.github.com/repos/OCA/server-tools/pulls/162","_links":{"self":{"href":"https://api.github.com/repos/OCA/server-tools/pulls/comments/30674130"},"html":{"href":"https://github.com/OCA/server-tools/pull/162#discussion_r30674130"},"pull_request":{"href":"https://api.github.com/repos/OCA/server-tools/pulls/162"}}},"pull_request":{"url":"https://api.github.com/repos/OCA/server-tools/pulls/162","id":34632363,"html_url":"https://github.com/OCA/server-tools/pull/162","diff_url":"https://github.com/OCA/server-tools/pull/162.diff","patch_url":"https://github.com/OCA/server-tools/pull/162.patch","issue_url":"https://api.github.com/repos/OCA/server-tools/issues/162","number":162,"state":"open","locked":false,"title":"add auth_password_settings module to enforce odoo user to set strong password","user":{"login":"dhp-denero","id":8101877,"avatar_url":"https://avatars.githubusercontent.com/u/8101877?v=3","gravatar_id":"","url":"https://api.github.com/users/dhp-denero","html_url":"https://github.com/dhp-denero","followers_url":"https://api.github.com/users/dhp-denero/followers","following_url":"https://api.github.com/users/dhp-denero/following{/other_user}","gists_url":"https://api.github.com/users/dhp-denero/gists{/gist_id}","starred_url":"https://api.github.com/users/dhp-denero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhp-denero/subscriptions","organizations_url":"https://api.github.com/users/dhp-denero/orgs","repos_url":"https://api.github.com/users/dhp-denero/repos","events_url":"https://api.github.com/users/dhp-denero/events{/privacy}","received_events_url":"https://api.github.com/users/dhp-denero/received_events","type":"User","site_admin":false},"body":"Hello Contributors,\r\n\r\nAs I was facing strange issue of rebase original branch, I removed my old cloned branch and create new branch. So now all well here. \r\nPlease advice me if still some change required to merge it to original branch.\r\n\r\nThanks,\r\n\r\nDhaval Patel","created_at":"2015-05-04T12:09:31Z","updated_at":"2015-05-20T06:31:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ba1c74c48da80bbea323bc065009f99f29c15d93","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/OCA/server-tools/pulls/162/commits","review_comments_url":"https://api.github.com/repos/OCA/server-tools/pulls/162/comments","review_comment_url":"https://api.github.com/repos/OCA/server-tools/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OCA/server-tools/issues/162/comments","statuses_url":"https://api.github.com/repos/OCA/server-tools/statuses/442ea75aa20fff640a6738c49d3461517b509265","head":{"label":"dhp-denero:8.0","ref":"8.0","sha":"442ea75aa20fff640a6738c49d3461517b509265","user":{"login":"dhp-denero","id":8101877,"avatar_url":"https://avatars.githubusercontent.com/u/8101877?v=3","gravatar_id":"","url":"https://api.github.com/users/dhp-denero","html_url":"https://github.com/dhp-denero","followers_url":"https://api.github.com/users/dhp-denero/followers","following_url":"https://api.github.com/users/dhp-denero/following{/other_user}","gists_url":"https://api.github.com/users/dhp-denero/gists{/gist_id}","starred_url":"https://api.github.com/users/dhp-denero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhp-denero/subscriptions","organizations_url":"https://api.github.com/users/dhp-denero/orgs","repos_url":"https://api.github.com/users/dhp-denero/repos","events_url":"https://api.github.com/users/dhp-denero/events{/privacy}","received_events_url":"https://api.github.com/users/dhp-denero/received_events","type":"User","site_admin":false},"repo":{"id":35032172,"name":"server-tools","full_name":"dhp-denero/server-tools","owner":{"login":"dhp-denero","id":8101877,"avatar_url":"https://avatars.githubusercontent.com/u/8101877?v=3","gravatar_id":"","url":"https://api.github.com/users/dhp-denero","html_url":"https://github.com/dhp-denero","followers_url":"https://api.github.com/users/dhp-denero/followers","following_url":"https://api.github.com/users/dhp-denero/following{/other_user}","gists_url":"https://api.github.com/users/dhp-denero/gists{/gist_id}","starred_url":"https://api.github.com/users/dhp-denero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhp-denero/subscriptions","organizations_url":"https://api.github.com/users/dhp-denero/orgs","repos_url":"https://api.github.com/users/dhp-denero/repos","events_url":"https://api.github.com/users/dhp-denero/events{/privacy}","received_events_url":"https://api.github.com/users/dhp-denero/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dhp-denero/server-tools","description":"Tools for Odoo Administrators to improve some technical features on Odoo.","fork":true,"url":"https://api.github.com/repos/dhp-denero/server-tools","forks_url":"https://api.github.com/repos/dhp-denero/server-tools/forks","keys_url":"https://api.github.com/repos/dhp-denero/server-tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dhp-denero/server-tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dhp-denero/server-tools/teams","hooks_url":"https://api.github.com/repos/dhp-denero/server-tools/hooks","issue_events_url":"https://api.github.com/repos/dhp-denero/server-tools/issues/events{/number}","events_url":"https://api.github.com/repos/dhp-denero/server-tools/events","assignees_url":"https://api.github.com/repos/dhp-denero/server-tools/assignees{/user}","branches_url":"https://api.github.com/repos/dhp-denero/server-tools/branches{/branch}","tags_url":"https://api.github.com/repos/dhp-denero/server-tools/tags","blobs_url":"https://api.github.com/repos/dhp-denero/server-tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dhp-denero/server-tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dhp-denero/server-tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/dhp-denero/server-tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dhp-denero/server-tools/statuses/{sha}","languages_url":"https://api.github.com/repos/dhp-denero/server-tools/languages","stargazers_url":"https://api.github.com/repos/dhp-denero/server-tools/stargazers","contributors_url":"https://api.github.com/repos/dhp-denero/server-tools/contributors","subscribers_url":"https://api.github.com/repos/dhp-denero/server-tools/subscribers","subscription_url":"https://api.github.com/repos/dhp-denero/server-tools/subscription","commits_url":"https://api.github.com/repos/dhp-denero/server-tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/dhp-denero/server-tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/dhp-denero/server-tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/dhp-denero/server-tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/dhp-denero/server-tools/contents/{+path}","compare_url":"https://api.github.com/repos/dhp-denero/server-tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dhp-denero/server-tools/merges","archive_url":"https://api.github.com/repos/dhp-denero/server-tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dhp-denero/server-tools/downloads","issues_url":"https://api.github.com/repos/dhp-denero/server-tools/issues{/number}","pulls_url":"https://api.github.com/repos/dhp-denero/server-tools/pulls{/number}","milestones_url":"https://api.github.com/repos/dhp-denero/server-tools/milestones{/number}","notifications_url":"https://api.github.com/repos/dhp-denero/server-tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dhp-denero/server-tools/labels{/name}","releases_url":"https://api.github.com/repos/dhp-denero/server-tools/releases{/id}","created_at":"2015-05-04T11:57:17Z","updated_at":"2015-05-04T12:04:51Z","pushed_at":"2015-05-04T12:04:51Z","git_url":"git://github.com/dhp-denero/server-tools.git","ssh_url":"git@github.com:dhp-denero/server-tools.git","clone_url":"https://github.com/dhp-denero/server-tools.git","svn_url":"https://github.com/dhp-denero/server-tools","homepage":"https://community.odoo.com/project/30","size":1580,"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":"8.0"}},"base":{"label":"OCA:8.0","ref":"8.0","sha":"6de7fba468354d39ebd5a012ada2a32f6e6b0680","user":{"login":"OCA","id":7600578,"avatar_url":"https://avatars.githubusercontent.com/u/7600578?v=3","gravatar_id":"","url":"https://api.github.com/users/OCA","html_url":"https://github.com/OCA","followers_url":"https://api.github.com/users/OCA/followers","following_url":"https://api.github.com/users/OCA/following{/other_user}","gists_url":"https://api.github.com/users/OCA/gists{/gist_id}","starred_url":"https://api.github.com/users/OCA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OCA/subscriptions","organizations_url":"https://api.github.com/users/OCA/orgs","repos_url":"https://api.github.com/users/OCA/repos","events_url":"https://api.github.com/users/OCA/events{/privacy}","received_events_url":"https://api.github.com/users/OCA/received_events","type":"Organization","site_admin":false},"repo":{"id":20896532,"name":"server-tools","full_name":"OCA/server-tools","owner":{"login":"OCA","id":7600578,"avatar_url":"https://avatars.githubusercontent.com/u/7600578?v=3","gravatar_id":"","url":"https://api.github.com/users/OCA","html_url":"https://github.com/OCA","followers_url":"https://api.github.com/users/OCA/followers","following_url":"https://api.github.com/users/OCA/following{/other_user}","gists_url":"https://api.github.com/users/OCA/gists{/gist_id}","starred_url":"https://api.github.com/users/OCA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OCA/subscriptions","organizations_url":"https://api.github.com/users/OCA/orgs","repos_url":"https://api.github.com/users/OCA/repos","events_url":"https://api.github.com/users/OCA/events{/privacy}","received_events_url":"https://api.github.com/users/OCA/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OCA/server-tools","description":"Tools for Odoo Administrators to improve some technical features on Odoo.","fork":false,"url":"https://api.github.com/repos/OCA/server-tools","forks_url":"https://api.github.com/repos/OCA/server-tools/forks","keys_url":"https://api.github.com/repos/OCA/server-tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OCA/server-tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OCA/server-tools/teams","hooks_url":"https://api.github.com/repos/OCA/server-tools/hooks","issue_events_url":"https://api.github.com/repos/OCA/server-tools/issues/events{/number}","events_url":"https://api.github.com/repos/OCA/server-tools/events","assignees_url":"https://api.github.com/repos/OCA/server-tools/assignees{/user}","branches_url":"https://api.github.com/repos/OCA/server-tools/branches{/branch}","tags_url":"https://api.github.com/repos/OCA/server-tools/tags","blobs_url":"https://api.github.com/repos/OCA/server-tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OCA/server-tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OCA/server-tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/OCA/server-tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OCA/server-tools/statuses/{sha}","languages_url":"https://api.github.com/repos/OCA/server-tools/languages","stargazers_url":"https://api.github.com/repos/OCA/server-tools/stargazers","contributors_url":"https://api.github.com/repos/OCA/server-tools/contributors","subscribers_url":"https://api.github.com/repos/OCA/server-tools/subscribers","subscription_url":"https://api.github.com/repos/OCA/server-tools/subscription","commits_url":"https://api.github.com/repos/OCA/server-tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/OCA/server-tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/OCA/server-tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/OCA/server-tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/OCA/server-tools/contents/{+path}","compare_url":"https://api.github.com/repos/OCA/server-tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OCA/server-tools/merges","archive_url":"https://api.github.com/repos/OCA/server-tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OCA/server-tools/downloads","issues_url":"https://api.github.com/repos/OCA/server-tools/issues{/number}","pulls_url":"https://api.github.com/repos/OCA/server-tools/pulls{/number}","milestones_url":"https://api.github.com/repos/OCA/server-tools/milestones{/number}","notifications_url":"https://api.github.com/repos/OCA/server-tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OCA/server-tools/labels{/name}","releases_url":"https://api.github.com/repos/OCA/server-tools/releases{/id}","created_at":"2014-06-16T18:52:44Z","updated_at":"2015-05-14T20:38:43Z","pushed_at":"2015-05-20T06:22:24Z","git_url":"git://github.com/OCA/server-tools.git","ssh_url":"git@github.com:OCA/server-tools.git","clone_url":"https://github.com/OCA/server-tools.git","svn_url":"https://github.com/OCA/server-tools","homepage":"https://community.odoo.com/project/30","size":4900,"stargazers_count":48,"watchers_count":48,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":125,"mirror_url":null,"open_issues_count":41,"forks":125,"open_issues":41,"watchers":48,"default_branch":"8.0"}},"_links":{"self":{"href":"https://api.github.com/repos/OCA/server-tools/pulls/162"},"html":{"href":"https://github.com/OCA/server-tools/pull/162"},"issue":{"href":"https://api.github.com/repos/OCA/server-tools/issues/162"},"comments":{"href":"https://api.github.com/repos/OCA/server-tools/issues/162/comments"},"review_comments":{"href":"https://api.github.com/repos/OCA/server-tools/pulls/162/comments"},"review_comment":{"href":"https://api.github.com/repos/OCA/server-tools/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OCA/server-tools/pulls/162/commits"},"statuses":{"href":"https://api.github.com/repos/OCA/server-tools/statuses/442ea75aa20fff640a6738c49d3461517b509265"}}}}