diff --git a/ipaserver/plugins/config.py b/ipaserver/plugins/config.py index db008d004..e2aa5cdb1 100644 --- a/ipaserver/plugins/config.py +++ b/ipaserver/plugins/config.py @@ -516,7 +516,8 @@ class config_mod(LDAPUpdate): def _enable_sid(self, ldap, options): # the user must have the Replication Administrators privilege privilege = 'Replication Administrators' - if not principal_has_privilege(self.api, context.principal, privilege): + op_account = getattr(context, 'principal', None) + if not principal_has_privilege(self.api, op_account, privilege): raise errors.ACIError( info=_("not allowed to enable SID generation"))