fix LoginCreatesUser check
This commit is contained in:
parent
7350ff6293
commit
9333e61014
1 changed files with 2 additions and 2 deletions
|
|
@ -294,7 +294,7 @@ class Session(object):
|
|||
login_principal = cprinc.name
|
||||
user_id = self.getUserIdFromKerberos(login_principal)
|
||||
if not user_id:
|
||||
if context.opts.get('LoginCreatesUser', 'yes').lower() in ('yes', 'on', 'true', '1'):
|
||||
if context.opts.get('LoginCreatesUser'):
|
||||
user_id = self.createUserFromKerberos(login_principal)
|
||||
else:
|
||||
raise koji.AuthError, 'Unknown Kerberos principal: %s' % login_principal
|
||||
|
|
@ -378,7 +378,7 @@ class Session(object):
|
|||
if result:
|
||||
user_id = result[0]
|
||||
else:
|
||||
if context.opts.get('LoginCreatesUser', 'yes').lower() in ('yes', 'on', 'true', '1'):
|
||||
if context.opts.get('LoginCreatesUser'):
|
||||
user_id = self.createUser(username)
|
||||
else:
|
||||
raise koji.AuthError, 'Unknown user: %s' % username
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue