Commit e81dfeff authored by kaiyou's avatar kaiyou
Browse files

Remove trailing spaces when checkin api permissions

parent da4585fe
Pipeline #1057 passed with stage
in 2 minutes and 26 seconds
......@@ -45,7 +45,7 @@ def can_access_domain(f):
@wraps(f)
def decorated_function(*args, **kwargs):
if current_user.role.name not in ['Administrator', 'Operator']:
domain_name = kwargs.get('domain_name')
domain_name = kwargs.get('domain_name', '').rstrip('.')
domain = Domain.query.filter(Domain.name == domain_name).first()
if not domain:
......@@ -203,7 +203,7 @@ def apikey_can_access_domain(f):
apikey = g.apikey
if g.apikey.role.name not in ['Administrator', 'Operator']:
domains = apikey.domains
zone_id = kwargs.get('zone_id')
zone_id = kwargs.get('zone_id', '').rstrip('.')
domain_names = [item.name for item in domains]
if zone_id not in domain_names:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment