Skip to content

Commit

Permalink
made unetid attribute optional to reflect schema
Browse files Browse the repository at this point in the history
  • Loading branch information
sternj committed Jul 15, 2020
1 parent 491a81e commit 0219efd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ipaserver/plugins/unetuser.py
Expand Up @@ -10,7 +10,7 @@
unetuser_attributes = ["unetID"]
user.default_attributes.extend(unetuser_attributes)
takes_params = (
Str('unetid',
Str('unetid?',
cli_name="unetid",
maxlength=64,
label=_("User UNET uid")),
Expand Down Expand Up @@ -41,7 +41,8 @@ def usermod_precallback(self, ldap, dn, entry, attrs_list,*keys, **options):
if 'objectclass' not in entry.keys():
old_entry = ldap.get_entry(dn, ['objectclass'])
entry['objectclass'] = old_entry['objectclass']
entry['objectclass'].append('unetUser')
if not self.obj.has_objectclass('unetUser'):
entry['objectclass'].append('unetUser')
return dn

user_mod.register_pre_callback(usermod_precallback)

0 comments on commit 0219efd

Please sign in to comment.