Allow new domains to be absolute (#1227)

author: corubba
This commit is contained in:
jbe-dw 2022-06-24 23:00:33 +02:00 committed by GitHub
commit 6908f1d209
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -363,6 +363,9 @@ def add():
'errors/400.html', 'errors/400.html',
msg="Please enter a valid domain name"), 400 msg="Please enter a valid domain name"), 400
if domain_name.endswith('.'):
domain_name = domain_name[:-1]
# If User creates the domain, check some additional stuff # If User creates the domain, check some additional stuff
if current_user.role.name not in ['Administrator', 'Operator']: if current_user.role.name not in ['Administrator', 'Operator']:
# Get all the account_ids of the user # Get all the account_ids of the user