Skip to content

Commit

Permalink
fix: Jans cli user userpassword (#1542)
Browse files Browse the repository at this point in the history
* fix: jans-cli user password

* fix: jans-linux-setup capital user jansStatus
  • Loading branch information
devrimyatar committed Jun 13, 2022
1 parent 073857c commit d2e13a2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion jans-cli/cli/config_cli.py
Expand Up @@ -1225,6 +1225,7 @@ def get_schema_from_reference(self, ref):

if 'allOf' in schema_:
all_schema = OrderedDict()
all_schema['required'] = []

all_schema['properties'] = OrderedDict()
for sch in schema_['allOf']:
Expand All @@ -1233,6 +1234,7 @@ def get_schema_from_reference(self, ref):
elif 'properties' in sch:
for sprop in sch['properties']:
all_schema['properties'][sprop] = sch['properties'][sprop]
all_schema['required'] += sch.get('required', [])

schema_ = all_schema

Expand Down Expand Up @@ -1408,10 +1410,12 @@ def get_input_for_schema_(self, schema, model, spacing=0, initialised=False, get

if model.__class__.__name__ == 'type':
modelObject = model(**data)
for key_ in data:
if data[key_] and not getattr(modelObject, key_, None):
setattr(modelObject, key_, data[key_])
return modelObject
else:
for key_ in data:
# if data[key_]:
setattr(model, key_, data[key_])

return model
Expand Down
Expand Up @@ -9,7 +9,7 @@ middleName: Admin
nickname: Admin
sn: User
userPassword: %(encoded_admin_password)s
jansStatus: active
jansStatus: ACTIVE
memberOf: inum=60B7,ou=groups,o=jans
displayName: Default Admin User
mail: admin@%(hostname)s
Expand Down

0 comments on commit d2e13a2

Please sign in to comment.