From 81c2fb46f10efaf1ccd4f83f4f34af506498e9cf Mon Sep 17 00:00:00 2001
From: Tobias Rueetschi
Date: Tue, 30 Aug 2016 21:47:04 +0200
Subject: [PATCH 1/2] univention udm_user: override password history.
---
univention/udm_user.py | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/univention/udm_user.py b/univention/udm_user.py
index 11213e465a3..c3406b27299 100644
--- a/univention/udm_user.py
+++ b/univention/udm_user.py
@@ -184,6 +184,16 @@ options:
default: None
description:
- Organisation
+ overridePWHistory:
+ required: false
+ default: False
+ description:
+ - Override password history
+ overridePWLength:
+ required: false
+ default: False
+ description:
+ - Override password check
pager_telephonenumber:
required: false
default: []
@@ -390,6 +400,10 @@ def main():
aliases=['mobileTelephoneNumber']),
organisation = dict(default=None,
type='str'),
+ overridePWHistory = dict(default=False,
+ type='bool'),
+ overridePWLength = dict(default=False,
+ type='bool'),
pager_telephonenumber = dict(default=[],
type='list',
aliases=['pagerTelephonenumber']),
@@ -496,6 +510,7 @@ def main():
for k in obj.keys():
if (k != 'password' and
k != 'groups' and
+ k != 'overridePWHistory' and
k in module.params and
module.params[k] is not None):
obj[k] = module.params[k]
@@ -507,6 +522,8 @@ def main():
else:
old_password = obj['password'].split('}', 2)[1]
if crypt.crypt(password, old_password) != old_password:
+ obj['overridePWHistory'] = module.params['overridePWHistory']
+ obj['overridePWLength'] = module.params['overridePWLength']
obj['password'] = password
diff = obj.diff()
From ec2cc904e2edc193fc4a26aea11d8f0648644dae Mon Sep 17 00:00:00 2001
From: Tobias Rueetschi
Date: Wed, 31 Aug 2016 12:42:54 +0200
Subject: [PATCH 2/2] udm_user: change overridePWHistory and overridePWLength
to snake_case
---
univention/udm_user.py | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/univention/udm_user.py b/univention/udm_user.py
index c3406b27299..2eed02a2c04 100644
--- a/univention/udm_user.py
+++ b/univention/udm_user.py
@@ -184,16 +184,18 @@ options:
default: None
description:
- Organisation
- overridePWHistory:
+ override_pw_history:
required: false
default: False
description:
- Override password history
- overridePWLength:
+ aliases: [ overridePWHistory ]
+ override_pw_length:
required: false
default: False
description:
- Override password check
+ aliases: [ overridePWLength ]
pager_telephonenumber:
required: false
default: []
@@ -401,9 +403,11 @@ def main():
organisation = dict(default=None,
type='str'),
overridePWHistory = dict(default=False,
- type='bool'),
+ type='bool',
+ aliases=['override_pw_history']),
overridePWLength = dict(default=False,
- type='bool'),
+ type='bool',
+ aliases=['override_pw_length']),
pager_telephonenumber = dict(default=[],
type='list',
aliases=['pagerTelephonenumber']),