Commit patched auth.py
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
parent
e3cb272c41
commit
9eca0c928d
1 changed files with 7 additions and 5 deletions
|
@ -413,12 +413,14 @@ class Session(object):
|
||||||
else:
|
else:
|
||||||
raise koji.AuthError('%s is not authorized to login other users' % client_dn)
|
raise koji.AuthError('%s is not authorized to login other users' % client_dn)
|
||||||
|
|
||||||
user_id = self.getUserId(username)
|
user_id = self.getUserIdFromKerberos(username)
|
||||||
if not user_id:
|
if not user_id:
|
||||||
if context.opts.get('LoginCreatesUser'):
|
user_id = self.getUserId(username)
|
||||||
user_id = self.createUser(username)
|
if not user_id:
|
||||||
else:
|
if context.opts.get('LoginCreatesUser'):
|
||||||
raise koji.AuthError('Unknown user: %s' % username)
|
user_id = self.createUser(username)
|
||||||
|
else:
|
||||||
|
raise koji.AuthError('Unknown user: %s' % username)
|
||||||
|
|
||||||
self.checkLoginAllowed(user_id)
|
self.checkLoginAllowed(user_id)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue