Add extra seat check in the user API call and turn off user->org conversion when authentication is LDAP
This commit is contained in:
parent
7ed3c603ec
commit
69be86be97
5 changed files with 17 additions and 9 deletions
|
@ -229,7 +229,12 @@ def conduct_signin(username_or_email, password):
|
|||
needs_email_verification = False
|
||||
invalid_credentials = False
|
||||
|
||||
verified = authentication.verify_user(username_or_email, password)
|
||||
verified = None
|
||||
try:
|
||||
verified = authentication.verify_user(username_or_email, password)
|
||||
except model.TooManyUsersException as ex:
|
||||
raise license_error(exception=ex)
|
||||
|
||||
if verified:
|
||||
if common_login(verified):
|
||||
return {'success': True}
|
||||
|
@ -247,6 +252,7 @@ def conduct_signin(username_or_email, password):
|
|||
|
||||
@resource('/v1/user/convert')
|
||||
@internal_only
|
||||
@show_if(app.config['AUTHENTICATION_TYPE'] == 'Database')
|
||||
class ConvertToOrganization(ApiResource):
|
||||
""" Operations for converting a user to an organization. """
|
||||
schemas = {
|
||||
|
|
Reference in a new issue