Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
usmannasir committed Jan 29, 2024
1 parent 49f4d63 commit a157bef
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions websiteFunctions/website.py
Original file line number Diff line number Diff line change
Expand Up @@ -2135,10 +2135,11 @@ def submitWebsiteCreation(self, userID=None, data=None):
if ACLManager.checkOwnerProtection(currentACL, loggedUser, newOwner) == 0:
return ACLManager.loadErrorJson('createWebSiteStatus', 0)

if ACLManager.CheckDomainBlackList(domain) == 0:
data_ret = {'status': 0, 'createWebSiteStatus': 0, 'error_message': "Blacklisted domain."}
json_data = json.dumps(data_ret)
return HttpResponse(json_data)
if currentACL['admin'] == 0:
if ACLManager.CheckDomainBlackList(domain) == 0:
data_ret = {'status': 0, 'createWebSiteStatus': 0, 'error_message': "Blacklisted domain."}
json_data = json.dumps(data_ret)
return HttpResponse(json_data)

if not validators.domain(domain):
data_ret = {'status': 0, 'createWebSiteStatus': 0, 'error_message': "Invalid domain."}
Expand Down

0 comments on commit a157bef

Please sign in to comment.