Skip to content
Permalink
Browse files
add owner protection for reseller center
  • Loading branch information
usmannasir committed Feb 18, 2020
2 parents c683ef3 + 25ef1dd commit 266cfc889b7110e887a1e0bc65fbf6857e38bea5
Showing 2 changed files with 8 additions and 1 deletion.
@@ -908,9 +908,16 @@ def saveResellerChanges(request):
else:
return ACLManager.loadErrorJson()

loggedUser = Administrator.objects.get(pk=val)

userToBeModified = Administrator.objects.get(userName=data['userToBeModified'])
newOwner = Administrator.objects.get(userName=data['newOwner'])

### Check user owners

if ACLManager.checkUserOwnerShip(currentACL, loggedUser, userToBeModified) == 0 or ACLManager.checkUserOwnerShip(currentACL, loggedUser, newOwner) == 0:
return ACLManager.loadErrorJson()

try:
if ACLManager.websitesLimitCheck(newOwner, data['websitesLimit'], userToBeModified) == 0:
finalResponse = {'status': 0,
@@ -236,4 +236,4 @@ a:hover {

.btn-min-width {
min-width: 300px;
}
}

0 comments on commit 266cfc8

Please sign in to comment.