Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions password_security/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,22 @@
{
"name": "Password Security",
"summary": "Allow admin to set password security requirements.",
"version": "13.0.1.0.0",
"version": "13.0.2.0.0",
"author": "LasLabs, "
"Kaushal Prajapati, "
"Tecnativa, "
"initOS GmbH, "
"Omar Nasr, "
"Odoo Community Association (OCA)",
"category": "Base",
"depends": ["auth_signup", "auth_password_policy_signup"],
"depends": ["auth_signup", "auth_password_policy_signup", "auth_password_policy"],
"website": "https://github.com/OCA/server-auth",
"external_dependencies": {"python": ["zxcvbn"]},
"license": "LGPL-3",
"data": [
"views/password_security.xml",
"views/res_config_settings_views.xml",
"views/signup_fields_templates.xml",
"security/ir.model.access.csv",
"security/res_users_pass_history.xml",
],
Expand Down
13 changes: 13 additions & 0 deletions password_security/controllers/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,19 @@ def change_password(self, fields):


class PasswordSecurityHome(AuthSignupHome):
def get_auth_signup_config(self):
config = super(PasswordSecurityHome, self).get_auth_signup_config()
company = request.env.company
config.update({
"password_length": company.password_length,
"password_lower": company.password_lower,
"password_upper": company.password_upper,
"password_numeric": company.password_numeric,
"password_special": company.password_special,
"password_estimate": company.password_estimate,
})
return config

def do_signup(self, qcontext):
password = qcontext.get("password")
user_id = request.env.user
Expand Down
Loading