Skip to content

Commit

Permalink
v1.8.9
Browse files Browse the repository at this point in the history
  • Loading branch information
usmannasir committed Aug 13, 2019
1 parent 4d4b0c7 commit d495ce4
Show file tree
Hide file tree
Showing 49 changed files with 26,565 additions and 15,704 deletions.
10 changes: 9 additions & 1 deletion backup/backupManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,9 @@ def submitBackupSchedule(self, userID = None, data = None):
command = "mv " + tempCronPath + " " + path
ProcessUtilities.executioner(command)

command = 'chown root:root %s' % (path)
ProcessUtilities.executioner(command)

command = "systemctl restart crond"
ProcessUtilities.executioner(command)

Expand Down Expand Up @@ -707,6 +710,9 @@ def submitBackupSchedule(self, userID = None, data = None):
command = "sudo mv " + tempCronPath + " " + path
ProcessUtilities.executioner(command)

command = 'chown root:root %s' % (path)
ProcessUtilities.executioner(command)

command = "sudo systemctl restart crond"
ProcessUtilities.executioner(command)

Expand Down Expand Up @@ -762,8 +768,10 @@ def scheduleDelete(self, userID = None, data = None):
command = "sudo mv " + tempCronPath + " " + path
ProcessUtilities.executioner(command)

command = "sudo systemctl restart crond"
command = 'chown root:root %s' % (path)
ProcessUtilities.executioner(command)

command = "sudo systemctl restart crond"
ProcessUtilities.executioner(command)

destination = dest.objects.get(destLoc=backupDest)
Expand Down
11 changes: 11 additions & 0 deletions baseTemplate/static/baseTemplate/custom-js/system-status.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ app.controller('adminController', function($scope,$http,$timeout) {
if(!Boolean(response.data.createNewUser)){
$('.createNewUser').hide();
}
if(!Boolean(response.data.listUsers)){
$('.listUsers').hide();
}
if(!Boolean(response.data.resellerCenter)){
$('.resellerCenter').hide();
}
Expand Down Expand Up @@ -158,6 +161,10 @@ app.controller('adminController', function($scope,$http,$timeout) {
$('.createPackage').hide();
}

if(!Boolean(response.data.listPackages)){
$('.listPackages').hide();
}

if(!Boolean(response.data.deletePackage)){
$('.deletePackage').hide();
}
Expand Down Expand Up @@ -208,6 +215,10 @@ app.controller('adminController', function($scope,$http,$timeout) {
$('.emailAsWhole').hide();
}

if(!Boolean(response.data.listEmails)){
$('.listEmails').hide();
}

if(!Boolean(response.data.createEmail)){
$('.createEmail').hide();
}
Expand Down
11 changes: 10 additions & 1 deletion baseTemplate/templates/baseTemplate/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@
</div>
</div>
<a class="header-btn" id="logout-btn" href="{% url 'logout' %}" title="{% trans 'Logout' %}">
<i class="glyph-icon icon-linecons-lock"></i>
<i class="glyph-icon icon-power-off"></i>
</a>


Expand Down Expand Up @@ -373,6 +373,9 @@
<li class="createNewUser"><a href="{% url 'createUser' %}"
title="{% trans 'Create New User' %}"><span>{% trans "Create New User" %}</span></a>
</li>
<li class="listUsers"><a href="{% url 'listUsers' %}"
title="{% trans 'List Users' %}"><span>{% trans "List Users" %}</span></a>
</li>
<li><a href="{% url 'modifyUsers' %}"
title="{% trans 'Modify User' %}"><span>{% trans "Modify User" %}</span></a></li>
<li class="deleteUser"><a href="{% url 'deleteUser' %}"
Expand Down Expand Up @@ -439,6 +442,9 @@
<li class="createPackage"><a href="{% url 'createPackage' %}"
title="{% trans 'Create Package' %}"><span>{% trans "Create Package" %}</span></a>
</li>
<li class="listPackages"><a href="{% url 'listPackages' %}"
title="{% trans 'List Packages' %}"><span>{% trans "List Packages" %}</span></a>
</li>
<li class="deletePackage"><a href="{% url 'deletePackage' %}"
title="{% trans 'Delete Package' %}"><span>{% trans "Delete Package" %}</span></a>
</li>
Expand Down Expand Up @@ -511,6 +517,9 @@
<li class="createEmail"><a href="{% url 'createEmailAccount' %}"
title="{% trans 'Create Email Account' %}"><span>{% trans "Create Email" %}</span></a>
</li>
<li class="listEmails"><a href="{% url 'listEmails' %}"
title="{% trans 'List Emails' %}"><span>{% trans "List Emails" %}</span></a>
</li>
<li class="deleteEmail"><a href="{% url 'deleteEmailAccount' %}"
title="{% trans 'Delete Email Account' %}"><span>{% trans "Delete Email" %}</span></a>
</li>
Expand Down
8 changes: 3 additions & 5 deletions dns/dnsManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,13 +519,11 @@ def deleteDNSRecord(self, userID = None, data = None):
delRecord = Records.objects.get(id=id)

admin = Administrator.objects.get(pk=userID)
if currentACL['admin'] == 1:
pass
elif delRecord.domainOwner.admin == admin:

if ACLManager.checkOwnership(delRecord.domainOwner.name, admin, currentACL) == 1:
pass
else:
return ACLManager.loadErrorJson()

return ACLManager.loadError()


delRecord.delete()
Expand Down
40 changes: 37 additions & 3 deletions install/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -952,7 +952,7 @@ def download_install_CyberPanel(self, mysqlPassword, mysql):

os.chdir(self.path)

command = "wget http://cyberpanel.sh/CyberPanel.1.8.8.tar.gz"
command = "wget http://cyberpanel.sh/CyberPanel.1.8.9.tar.gz"
#command = "wget http://cyberpanel.sh/CyberPanelTemp.tar.gz"
preFlightsChecks.call(command, self.distro, '[download_install_CyberPanel]',
'CyberPanel Download',
Expand All @@ -961,7 +961,7 @@ def download_install_CyberPanel(self, mysqlPassword, mysql):
##

count = 0
command = "tar zxf CyberPanel.1.8.8.tar.gz"
command = "tar zxf CyberPanel.1.8.9.tar.gz"
#command = "tar zxf CyberPanelTemp.tar.gz"
preFlightsChecks.call(command, self.distro, '[download_install_CyberPanel]',
'Extract CyberPanel',1, 1, os.EX_OSERR)
Expand Down Expand Up @@ -1054,7 +1054,7 @@ def download_install_CyberPanel(self, mysqlPassword, mysql):
path = "/usr/local/CyberCP/version.txt"
writeToFile = open(path, 'w')
writeToFile.writelines('1.8\n')
writeToFile.writelines('2')
writeToFile.writelines('9')
writeToFile.close()
except:
pass
Expand Down Expand Up @@ -1362,6 +1362,40 @@ def install_postfix_davecot(self):
preFlightsChecks.stdOut("Dovecot and Dovecot-MySQL successfully installed!")
break


if self.distro != centos:
command = 'curl https://repo.dovecot.org/DOVECOT-REPO-GPG | gpg --import'
subprocess.call(command, shell=True)

command = 'gpg --export ED409DA1 > /etc/apt/trusted.gpg.d/dovecot.gpg'
subprocess.call(command, shell=True)

debPath = '/etc/apt/sources.list.d/dovecot.list'
writeToFile = open(debPath, 'w')
writeToFile.write('deb https://repo.dovecot.org/ce-2.3-latest/ubuntu/bionic bionic main\n')
writeToFile.close()

try:
command = 'apt update -y'
subprocess.call(command, shell=True)
except:
pass

try:
command = 'DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical sudo apt-get -q -y -o "Dpkg::Options::=--force-confdef" -o "Dpkg::Options::=--force-confold" --only-upgrade install dovecot-mysql -y'
subprocess.call(command, shell=True)

command = 'dpkg --configure -a'
subprocess.call(command, shell=True)

command = 'apt --fix-broken install -y'
subprocess.call(command, shell=True)

command = 'DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical sudo apt-get -q -y -o "Dpkg::Options::=--force-confdef" -o "Dpkg::Options::=--force-confold" --only-upgrade install dovecot-mysql -y'
subprocess.call(command, shell=True)
except:
pass

except OSError, msg:
logging.InstallLog.writeToFile(str(msg) + " [install_postfix_davecot]")
return 0
Expand Down
Loading

0 comments on commit d495ce4

Please sign in to comment.