|
|
|
@ -22,6 +22,7 @@ def user_create(domain_name):
|
|
|
|
|
return flask.redirect(
|
|
|
|
|
flask.url_for('.user_list', domain_name=domain.name))
|
|
|
|
|
form = forms.UserForm()
|
|
|
|
|
if domain.max_quota_bytes:
|
|
|
|
|
form.quota_bytes.validators = [
|
|
|
|
|
wtforms.validators.NumberRange(max=domain.max_quota_bytes)]
|
|
|
|
|
if form.validate_on_submit():
|
|
|
|
@ -53,6 +54,7 @@ def user_edit(user_email):
|
|
|
|
|
wtforms_components.read_only(form.localpart)
|
|
|
|
|
form.pw.validators = []
|
|
|
|
|
form.localpart.validators = []
|
|
|
|
|
if max_quota_bytes:
|
|
|
|
|
form.quota_bytes.validators = [
|
|
|
|
|
wtforms.validators.NumberRange(max=max_quota_bytes)]
|
|
|
|
|
if form.validate_on_submit():
|
|
|
|
|