Add UI for handling the case when an enterprise has reached its maximum seat count
This commit is contained in:
parent
22cc7a85d4
commit
205362bc7b
7 changed files with 47 additions and 4 deletions
|
@ -8,7 +8,7 @@ from flask.ext.principal import identity_changed, AnonymousIdentity
|
|||
from app import app, billing as stripe, authentication
|
||||
from endpoints.api import (ApiResource, nickname, resource, validate_json_request, request_error,
|
||||
log_action, internal_only, NotFound, require_user_admin,
|
||||
InvalidToken, require_scope, format_date, hide_if, show_if)
|
||||
InvalidToken, require_scope, format_date, hide_if, show_if, license_error)
|
||||
from endpoints.api.subscribe import subscribe
|
||||
from endpoints.common import common_login
|
||||
from data import model
|
||||
|
@ -193,6 +193,8 @@ class User(ApiResource):
|
|||
code = model.create_confirm_email_code(new_user)
|
||||
send_confirmation_email(new_user.username, new_user.email, code.code)
|
||||
return 'Created', 201
|
||||
except model.TooManyUsersException as ex:
|
||||
raise license_error(exception=ex)
|
||||
except model.DataModelException as ex:
|
||||
raise request_error(exception=ex)
|
||||
|
||||
|
|
Reference in a new issue