Skip to content

Commit d495ce4

Browse files
committed
v1.8.9
1 parent 4d4b0c7 commit d495ce4

File tree

49 files changed

+26565
-15704
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+26565
-15704
lines changed

backup/backupManager.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -675,6 +675,9 @@ def submitBackupSchedule(self, userID = None, data = None):
675675
command = "mv " + tempCronPath + " " + path
676676
ProcessUtilities.executioner(command)
677677

678+
command = 'chown root:root %s' % (path)
679+
ProcessUtilities.executioner(command)
680+
678681
command = "systemctl restart crond"
679682
ProcessUtilities.executioner(command)
680683

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

713+
command = 'chown root:root %s' % (path)
714+
ProcessUtilities.executioner(command)
715+
710716
command = "sudo systemctl restart crond"
711717
ProcessUtilities.executioner(command)
712718

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

765-
command = "sudo systemctl restart crond"
771+
command = 'chown root:root %s' % (path)
772+
ProcessUtilities.executioner(command)
766773

774+
command = "sudo systemctl restart crond"
767775
ProcessUtilities.executioner(command)
768776

769777
destination = dest.objects.get(destLoc=backupDest)

baseTemplate/static/baseTemplate/custom-js/system-status.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,9 @@ app.controller('adminController', function($scope,$http,$timeout) {
126126
if(!Boolean(response.data.createNewUser)){
127127
$('.createNewUser').hide();
128128
}
129+
if(!Boolean(response.data.listUsers)){
130+
$('.listUsers').hide();
131+
}
129132
if(!Boolean(response.data.resellerCenter)){
130133
$('.resellerCenter').hide();
131134
}
@@ -158,6 +161,10 @@ app.controller('adminController', function($scope,$http,$timeout) {
158161
$('.createPackage').hide();
159162
}
160163

164+
if(!Boolean(response.data.listPackages)){
165+
$('.listPackages').hide();
166+
}
167+
161168
if(!Boolean(response.data.deletePackage)){
162169
$('.deletePackage').hide();
163170
}
@@ -208,6 +215,10 @@ app.controller('adminController', function($scope,$http,$timeout) {
208215
$('.emailAsWhole').hide();
209216
}
210217

218+
if(!Boolean(response.data.listEmails)){
219+
$('.listEmails').hide();
220+
}
221+
211222
if(!Boolean(response.data.createEmail)){
212223
$('.createEmail').hide();
213224
}

baseTemplate/templates/baseTemplate/index.html

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@
319319
</div>
320320
</div>
321321
<a class="header-btn" id="logout-btn" href="{% url 'logout' %}" title="{% trans 'Logout' %}">
322-
<i class="glyph-icon icon-linecons-lock"></i>
322+
<i class="glyph-icon icon-power-off"></i>
323323
</a>
324324

325325

@@ -373,6 +373,9 @@
373373
<li class="createNewUser"><a href="{% url 'createUser' %}"
374374
title="{% trans 'Create New User' %}"><span>{% trans "Create New User" %}</span></a>
375375
</li>
376+
<li class="listUsers"><a href="{% url 'listUsers' %}"
377+
title="{% trans 'List Users' %}"><span>{% trans "List Users" %}</span></a>
378+
</li>
376379
<li><a href="{% url 'modifyUsers' %}"
377380
title="{% trans 'Modify User' %}"><span>{% trans "Modify User" %}</span></a></li>
378381
<li class="deleteUser"><a href="{% url 'deleteUser' %}"
@@ -439,6 +442,9 @@
439442
<li class="createPackage"><a href="{% url 'createPackage' %}"
440443
title="{% trans 'Create Package' %}"><span>{% trans "Create Package" %}</span></a>
441444
</li>
445+
<li class="listPackages"><a href="{% url 'listPackages' %}"
446+
title="{% trans 'List Packages' %}"><span>{% trans "List Packages" %}</span></a>
447+
</li>
442448
<li class="deletePackage"><a href="{% url 'deletePackage' %}"
443449
title="{% trans 'Delete Package' %}"><span>{% trans "Delete Package" %}</span></a>
444450
</li>
@@ -511,6 +517,9 @@
511517
<li class="createEmail"><a href="{% url 'createEmailAccount' %}"
512518
title="{% trans 'Create Email Account' %}"><span>{% trans "Create Email" %}</span></a>
513519
</li>
520+
<li class="listEmails"><a href="{% url 'listEmails' %}"
521+
title="{% trans 'List Emails' %}"><span>{% trans "List Emails" %}</span></a>
522+
</li>
514523
<li class="deleteEmail"><a href="{% url 'deleteEmailAccount' %}"
515524
title="{% trans 'Delete Email Account' %}"><span>{% trans "Delete Email" %}</span></a>
516525
</li>

dns/dnsManager.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -519,13 +519,11 @@ def deleteDNSRecord(self, userID = None, data = None):
519519
delRecord = Records.objects.get(id=id)
520520

521521
admin = Administrator.objects.get(pk=userID)
522-
if currentACL['admin'] == 1:
523-
pass
524-
elif delRecord.domainOwner.admin == admin:
522+
523+
if ACLManager.checkOwnership(delRecord.domainOwner.name, admin, currentACL) == 1:
525524
pass
526525
else:
527-
return ACLManager.loadErrorJson()
528-
526+
return ACLManager.loadError()
529527

530528

531529
delRecord.delete()

install/install.py

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -952,7 +952,7 @@ def download_install_CyberPanel(self, mysqlPassword, mysql):
952952

953953
os.chdir(self.path)
954954

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

963963
count = 0
964-
command = "tar zxf CyberPanel.1.8.8.tar.gz"
964+
command = "tar zxf CyberPanel.1.8.9.tar.gz"
965965
#command = "tar zxf CyberPanelTemp.tar.gz"
966966
preFlightsChecks.call(command, self.distro, '[download_install_CyberPanel]',
967967
'Extract CyberPanel',1, 1, os.EX_OSERR)
@@ -1054,7 +1054,7 @@ def download_install_CyberPanel(self, mysqlPassword, mysql):
10541054
path = "/usr/local/CyberCP/version.txt"
10551055
writeToFile = open(path, 'w')
10561056
writeToFile.writelines('1.8\n')
1057-
writeToFile.writelines('2')
1057+
writeToFile.writelines('9')
10581058
writeToFile.close()
10591059
except:
10601060
pass
@@ -1362,6 +1362,40 @@ def install_postfix_davecot(self):
13621362
preFlightsChecks.stdOut("Dovecot and Dovecot-MySQL successfully installed!")
13631363
break
13641364

1365+
1366+
if self.distro != centos:
1367+
command = 'curl https://repo.dovecot.org/DOVECOT-REPO-GPG | gpg --import'
1368+
subprocess.call(command, shell=True)
1369+
1370+
command = 'gpg --export ED409DA1 > /etc/apt/trusted.gpg.d/dovecot.gpg'
1371+
subprocess.call(command, shell=True)
1372+
1373+
debPath = '/etc/apt/sources.list.d/dovecot.list'
1374+
writeToFile = open(debPath, 'w')
1375+
writeToFile.write('deb https://repo.dovecot.org/ce-2.3-latest/ubuntu/bionic bionic main\n')
1376+
writeToFile.close()
1377+
1378+
try:
1379+
command = 'apt update -y'
1380+
subprocess.call(command, shell=True)
1381+
except:
1382+
pass
1383+
1384+
try:
1385+
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'
1386+
subprocess.call(command, shell=True)
1387+
1388+
command = 'dpkg --configure -a'
1389+
subprocess.call(command, shell=True)
1390+
1391+
command = 'apt --fix-broken install -y'
1392+
subprocess.call(command, shell=True)
1393+
1394+
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'
1395+
subprocess.call(command, shell=True)
1396+
except:
1397+
pass
1398+
13651399
except OSError, msg:
13661400
logging.InstallLog.writeToFile(str(msg) + " [install_postfix_davecot]")
13671401
return 0

0 commit comments

Comments
 (0)