Review Code

This commit is contained in:
Zarak Khan
2024-02-22 11:35:06 +05:00
parent 8b4c0ffc3b
commit 2fab5982a4
75 changed files with 11067 additions and 1022 deletions

View File

@@ -0,0 +1,288 @@
newapp.controller('sslIssueCtrlV2', function ($scope, $http) {
$scope.sslIssueCtrl = true;
$scope.manageSSLLoading = true;
$scope.issueSSLBtn = true;
$scope.canNotIssue = true;
$scope.sslIssued = true;
$scope.couldNotConnect = true;
$scope.showbtn = function () {
$scope.issueSSLBtn = false;
};
$scope.issueSSL = function () {
$scope.manageSSLLoading = false;
var url = "/manageSSL/issueSSL";
var data = {
virtualHost: $scope.virtualHost,
};
var config = {
headers: {
'X-CSRFToken': getCookie('csrftoken')
}
};
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
function ListInitialDatas(response) {
if (response.data.SSL == 1) {
$scope.sslIssueCtrl = true;
$scope.manageSSLLoading = true;
$scope.issueSSLBtn = false;
$scope.canNotIssue = true;
$scope.sslIssued = false;
$scope.couldNotConnect = true;
$scope.sslDomain = $scope.virtualHost;
} else {
$scope.sslIssueCtrl = true;
$scope.manageSSLLoading = true;
$scope.issueSSLBtn = false;
$scope.canNotIssue = false;
$scope.sslIssued = true;
$scope.couldNotConnect = true;
$scope.errorMessage = response.data.error_message;
}
}
function cantLoadInitialDatas(response) {
$scope.sslIssueCtrl = true;
$scope.manageSSLLoading = true;
$scope.issueSSLBtn = false;
$scope.canNotIssue = true;
$scope.sslIssued = true;
$scope.couldNotConnect = false;
}
};
});
newapp.controller('sslIssueForHostNameCtrlV2', function ($scope, $http) {
$scope.sslIssueCtrl = true;
$scope.manageSSLLoading = true;
$scope.issueSSLBtn = true;
$scope.canNotIssue = true;
$scope.sslIssued = true;
$scope.couldNotConnect = true;
$scope.showbtn = function () {
$scope.issueSSLBtn = false;
};
$scope.issueSSL = function () {
$scope.manageSSLLoading = false;
var url = "/manageSSL/obtainHostNameSSL";
var data = {
virtualHost: $scope.virtualHost,
};
var config = {
headers: {
'X-CSRFToken': getCookie('csrftoken')
}
};
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
function ListInitialDatas(response) {
if (response.data.SSL == 1) {
$scope.sslIssueCtrl = true;
$scope.manageSSLLoading = true;
$scope.issueSSLBtn = false;
$scope.canNotIssue = true;
$scope.sslIssued = false;
$scope.couldNotConnect = true;
$scope.sslDomain = $scope.virtualHost;
} else {
$scope.sslIssueCtrl = true;
$scope.manageSSLLoading = true;
$scope.issueSSLBtn = false;
$scope.canNotIssue = false;
$scope.sslIssued = true;
$scope.couldNotConnect = true;
$scope.errorMessage = response.data.error_message;
}
}
function cantLoadInitialDatas(response) {
$scope.sslIssueCtrl = true;
$scope.manageSSLLoading = true;
$scope.issueSSLBtn = false;
$scope.canNotIssue = true;
$scope.sslIssued = true;
$scope.couldNotConnect = false;
}
};
});
newapp.controller('sslIssueForMailServerV2', function ($scope, $http) {
$scope.sslIssueCtrl = true;
$scope.manageSSLLoading = true;
$scope.issueSSLBtn = true;
$scope.canNotIssue = true;
$scope.sslIssued = true;
$scope.couldNotConnect = true;
$scope.showbtn = function () {
$scope.issueSSLBtn = false;
};
$scope.issueSSL = function () {
$scope.manageSSLLoading = false;
var url = "/manageSSL/obtainMailServerSSL";
var data = {
virtualHost: $scope.virtualHost,
};
var config = {
headers: {
'X-CSRFToken': getCookie('csrftoken')
}
};
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
function ListInitialDatas(response) {
if (response.data.SSL === 1) {
$scope.sslIssueCtrl = true;
$scope.manageSSLLoading = true;
$scope.issueSSLBtn = false;
$scope.canNotIssue = true;
$scope.sslIssued = false;
$scope.couldNotConnect = true;
$scope.sslDomain = $scope.virtualHost;
} else {
$scope.sslIssueCtrl = true;
$scope.manageSSLLoading = true;
$scope.issueSSLBtn = false;
$scope.canNotIssue = false;
$scope.sslIssued = true;
$scope.couldNotConnect = true;
$scope.errorMessage = response.data.error_message;
}
}
function cantLoadInitialDatas(response) {
$scope.sslIssueCtrl = true;
$scope.manageSSLLoading = true;
$scope.issueSSLBtn = false;
$scope.canNotIssue = true;
$scope.sslIssued = true;
$scope.couldNotConnect = false;
}
};
});
newapp.controller('sslIssueCtrlV2V2', function ($scope, $http) {
$scope.manageSSLLoading = true;
$scope.showbtn = function () {
$scope.issueSSLBtn = false;
};
$scope.issueSSL = function () {
$scope.manageSSLLoading = false;
var url = "/manageSSL/v2IssueSSL";
var data = {
virtualHost: $scope.virtualHost,
};
var config = {
headers: {
'X-CSRFToken': getCookie('csrftoken')
}
};
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
function ListInitialDatas(response) {
$scope.manageSSLLoading = true;
if (response.data.SSL === 1) {
$scope.sslStatus = 'Issued.';
$scope.sslLogs = response.data.sslLogs;
} else {
$scope.sslStatus = 'Failed.';
$scope.sslLogs = response.data.sslLogs;
}
}
function cantLoadInitialDatas(response) {
$scope.sslIssueCtrl = true;
$scope.manageSSLLoading = true;
$scope.issueSSLBtn = false;
$scope.canNotIssue = true;
$scope.sslIssued = true;
$scope.couldNotConnect = false;
}
};
});

View File

@@ -0,0 +1,64 @@
{% extends "baseTemplate/newBase.html" %}
{% load i18n %}
{% block titleNew %}{% trans "Home - CyberPanel" %}{% endblock %}
{% block newContent %}
{% load static %}
<div ng-controller="sslIssueCtrlV2" class="p-8">
<div class="flex lg:flex-row justify-between items-center sm:flex-col">
<div class="flex items-center">
<p class="text-4xl font-bold">Manage SSL -</p>
<a target="_blank" href="http://go.cyberpanel.net/ssl-docs"
style="height: 23px;line-height: 21px;"
class="bg-blue-200 px-2 font-bold mt-2 ml-3"
title=""><span>{% trans "SSL Docs" %}</span></a>
</div>
</div>
<p class="text-xs text-gray-600 py-2 font-semibold">This page can be used to issue Lets Encrypt SSL for
existing websites on server.
</p>
<div class="flex items-center py-4">
<p class="text-xl font-bold">Manage SSL</p>
<img ng-hide="manageSSLLoading" src="{% static 'images/loading.gif' %}">
</div>
<hr>
<div class="flex mt-4 py-2 px-6">
<div>
<p class="font-semibold w-60">Select Website</p>
</div>
<div>
<select ng-change="showbtn()" ng-model="virtualHost" class="w-80 bg-gray-100 rounded px-2 py-1">
{% for items in websiteList %}
<option>{{ items }}</option>
{% endfor %}
</select>
</div>
</div>
<div ng-hide="issueSSLBtn">
<div class="flex justify-center mt-6 mb-2">
<button ng-click="issueSSL()"
class="bg-orange-500 text-white font-bold px-4 py-2 text-xl">
Issue SSL
</button>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-6">
<div ng-hide="canNotIssue"
class="flex justify-center bg-red-500 rounded-lg text-white px-2 py-1 font-semibold">
<p>{% trans "Cannot issue SSL. Error message:" %} {$ errorMessage $}</p>
</div>
<div ng-hide="sslIssued" class="flex justify-center bg-green-500 px-2 rounded-lg py-1 font-semibold">
<p>{% trans "SSL Issued for" %} <strong>{$ sslDomain $}</strong></p>
</div>
<div ng-hide="couldNotConnect"
class="flex justify-center bg-red-500 rounded-lg text-white px-2 py-1 font-semibold">
<p>{% trans "Could not connect to server. Please refresh this page." %}</p>
</div>
</div>
</div>
</div>
{% endblock %}

View File

@@ -0,0 +1,65 @@
{% extends "baseTemplate/newBase.html" %}
{% load i18n %}
{% block titleNew %}{% trans "Home - CyberPanel" %}{% endblock %}
{% block newContent %}
{% load static %}
<div ng-controller="sslIssueForHostNameCtrlV2" class="p-8">
<div class="flex lg:flex-row justify-between items-center sm:flex-col">
<div class="flex items-center">
<p class="text-4xl font-bold">Issue SSL For Hostname -</p>
<a target="_blank" href="http://go.cyberpanel.net/hostname-ssl" style="height: 23px;line-height: 21px;"
class="bg-blue-200 px-2 font-bold mt-2 ml-3"
title=""><span>{% trans "SSL Docs" %}</span></a>
</div>
</div>
<p class="text-xs text-gray-600 py-2 font-semibold">Lets Encrypt SSL for hostname to access CyberPanel on
verified SSL.
</p>
<div class="flex items-center py-4">
<p class="text-xl font-bold">Issue SSL For Hostname</p>
<img ng-hide="manageSSLLoading" src="{% static 'images/loading.gif' %}">
</div>
<hr>
<div class="flex mt-4 py-2 px-6">
<div>
<p class="font-semibold w-60">Select Website</p>
</div>
<div>
<select ng-change="showbtn()" ng-model="virtualHost" class="w-80 bg-gray-100 rounded px-2 py-1">
{% for items in websiteList %}
<option>{{ items }}</option>
{% endfor %}
</select>
</div>
</div>
<div ng-hide="issueSSLBtn">
<div class="flex justify-center mt-6 mb-2">
<button ng-click="issueSSL()"
class="bg-orange-500 text-white font-bold px-4 py-2 text-xl">
Issue SSL
</button>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-6">
<div ng-hide="canNotIssue"
class="flex justify-center bg-red-500 rounded-lg text-white px-2 py-1 font-semibold">
<p>{% trans "Cannot issue SSL. Error message:" %} {$ errorMessage $}</p>
</div>
<div ng-hide="sslIssued" class="flex justify-center bg-green-500 px-2 rounded-lg py-1 font-semibold">
<p>{% trans "SSL Issued. You can now access CyberPanel at:" %} <strong>https://{$ sslDomain
$}:8090</strong></p>
</div>
<div ng-hide="couldNotConnect"
class="flex justify-center bg-green-500 px-2 rounded-lg py-1 font-semibold">
<p>{% trans "SSL Issued. You can now access CyberPanel at:" %}
<strong>https://"domain":8090</strong></p>
</div>
</div>
</div>
</div>
{% endblock %}

View File

@@ -0,0 +1,62 @@
{% extends "baseTemplate/newBase.html" %}
{% load i18n %}
{% block titleNew %}{% trans "Home - CyberPanel" %}{% endblock %}
{% block newContent %}
{% load static %}
<div ng-controller="sslIssueForMailServerV2" class="p-8">
<div class="flex lg:flex-row justify-between items-center sm:flex-col">
<div class="flex items-center">
<p class="text-4xl font-bold">Issue SSL For MailServer -</p>
<a target="_blank" href="http://go.cyberpanel.net/mailserver-ssl"
style="height: 23px;line-height: 21px;" class="bg-blue-200 px-2 font-bold mt-2 ml-3"
title=""><span>{% trans "SSL Docs" %}</span></a>
</div>
</div>
<p class="text-xs text-gray-600 py-2 font-semibold">Lets Encrypt SSL for MailServer (Postfix/Dovecot).
</p>
<div class="flex items-center py-4">
<p class="text-xl font-bold">Issue SSL For MailServer</p>
<img ng-hide="manageSSLLoading" src="{% static 'images/loading.gif' %}">
</div>
<hr>
<div class="flex mt-4 py-2 px-6">
<div>
<p class="font-semibold w-60">Select Website</p>
</div>
<div>
<select ng-change="showbtn()" ng-model="virtualHost" class="w-80 bg-gray-100 rounded px-2 py-1">
{% for items in websiteList %}
<option>{{ items }}</option>
{% endfor %}
</select>
</div>
</div>
<div ng-hide="issueSSLBtn">
<div class="flex justify-center mt-6 mb-2">
<button ng-click="issueSSL()"
class="bg-orange-500 text-white font-bold px-4 py-2 text-xl">
Issue SSL
</button>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-6">
<div ng-hide="canNotIssue"
class="flex justify-center bg-red-500 rounded-lg text-white px-2 py-1 font-semibold">
<p>{% trans "Cannot issue SSL. Error message:" %} {$ errorMessage $}</p>
</div>
<div ng-hide="sslIssued" class="flex justify-center bg-green-500 px-2 rounded-lg py-1 font-semibold">
<p>{% trans "SSL Issued, your mail server now uses Lets Encrypt!" %}</p>
</div>
<div ng-hide="couldNotConnect"
class="flex justify-center bg-green-500 px-2 rounded-lg py-1 font-semibold">
<p>{% trans "Could not connect to server, please refresh this page." %}</p>
</div>
</div>
</div>
</div>
{% endblock %}

View File

@@ -0,0 +1,167 @@
{% extends "baseTemplate/newBase.html" %}
{% load i18n %}
{% block titleNew %}{% trans "Home - CyberPanel" %}{% endblock %}
{% block newContent %}
{% load static %}
{% if PremStat %}
<div ng-controller="sslIssueCtrlV2V2" class="p-8">
<div class="flex lg:flex-row justify-between items-center sm:flex-col">
<div class="flex items-center">
<p class="text-4xl font-bold">SSL v2 -</p>
<a target="_blank" href="https://youtu.be/kDUANNvtOwE"
style="height: 23px;line-height: 21px;"
class="bg-blue-200 px-2 font-bold mt-2 ml-3"
title=""><span>{% trans "DNS Docs" %}</span></a>
</div>
</div>
<p class="text-xs text-gray-600 py-2 font-semibold">On this page, you have the option to configure DNS
providers that CyberPanel can utilize for issuing SSL certificates, providing enhanced flexibility and
ease of renewal.
</p>
<p align="center" style="margin-top: 2%; margin-bottom: 2%">
<iframe width="788.54" height="443" src="https://www.youtube.com/embed/kDUANNvtOwE"
title="YouTube video player" frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
allowfullscreen></iframe>
</p>
<div class="flex items-center py-4">
<p class="text-xl font-bold">SSL v2</p>
</div>
<hr>
{% if SaveSuccess %}
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-6">
<div class="flex justify-center bg-green-500 px-2 rounded-lg py-1 font-semibold">
<p>{% trans "Changes saved succesfully." %}</p>
</div>
</div>
</div>
{% endif %}
<ul class="flex py-2">
<li id="dns_tab_button"
class="hover:bg-orange-200 border-2 border-black rounded-l-3xl px-2 py-2 w-60 cursor-pointer active"
onclick="showTab1('issue_SSL')">
<a class="flex justify-center">
<p class="text-2xl font-bold">Issue SSL</p>
</a>
</li>
<li id="api_tab_button"
class="hover:bg-orange-200 border-2 border-black rounded-r-3xl px-2 py-2 w-60 cursor-pointer"
onclick="showTab1('api_settings')">
<a class="flex justify-center">
<p class="text-2xl font-bold">API Settings</p>
</a>
</li>
</ul>
<div id="issue_SSL" class="tab-content1">
<div class="flex mt-4 py-2 px-6 items-center">
<div>
<p class="font-semibold w-60">Select Domain</p>
</div>
<div>
<select ng-model="virtualHost"
class="w-80 bg-gray-100 rounded px-2 py-1">
{% for items in websiteList %}
<option>{{ items }}</option>
{% endfor %}
</select>
</div>
<div class="flex ml-3">
<button ng-click="issueSSL()"
class="bg-orange-500 text-white font-semibold px-2 py-1">
Issue SSL
</button>
<img ng-hide="manageSSLLoading" src="{% static 'images/loading.gif' %}">
</div>
</div>
<div>
<h3 class="text-xl font-bold">SSL Status: {$ sslStatus $}</h3>
<div>
<textarea ng-model="sslLogs" class="w-full border"
rows="20"></textarea>
</div>
</div>
</div>
<div id="api_settings" class="tab-content1" style="display: none;">
<form method="post" action="{% url 'v2ManageSSLV2' %}">
{% csrf_token %}
<p class="text-xl font-bold">Cloudflare Settings</p>
<div class="flex mt-4 py-2 px-6">
<div>
<p class="font-semibold w-60">CloudFlare Email</p>
</div>
<div>
<input name="SAVED_CF_Email" type="text" class="w-80 bg-gray-100 rounded px-2 py-1"
value="{{ SAVED_CF_Email }}" required>
</div>
</div>
<div class="flex mt-4 py-2 px-6">
<div>
<p class="font-semibold w-60">API Token</p>
</div>
<div>
<input name="SAVED_CF_Key" type="text" class="w-80 bg-gray-100 rounded px-2 py-1"
value="{{ SAVED_CF_Key }}" required>
</div>
</div>
<div>
<div class="flex justify-center mt-6 mb-2">
<button type="submit"
class="bg-orange-500 text-white font-bold px-4 py-2 text-xl">
Save
</button>
</div>
</div>
</form>
</div>
</div>
{% else %}
<style>
.feturecard {
width: 30%;
padding: 46px;
margin: 15px
}
</style>
<div class="container">
<div id="page-title" align="center">
<h1 style="color: black"><strong>SSLv2 Comes with Full Automation + Wildcard SSLs! </strong></h1>
<p style="font-size: 15px; color: black; margin-top: 1%">Are you tired of the hassle that comes with
setting up SSL certificates for your website? Do you want a faster and easier way to secure your
website without the need for manual verification? <br><br>
Introducing CyberPanel's new feature, SSL v2! With SSL v2, you can automatically issue SSL
certificates using the ACME DNS verification method. This means that you no longer have to worry
about going through the manual process of verifying ownership of your domain. <br><br>
What's even better is that we've integrated two of the most popular domain registrars, Cloudflare
and Namecheap, so you can easily issue SSL certificates with just a few clicks. No more fiddling
around with complicated settings and DNS configurations! <br><br>
With SSL v2, you can rest easy knowing that your website is secure and your visitors' data is
protected. Don't wait any longer to upgrade your website's security - get SSL v2 today!<br></p>
</div>
<p align="center">
<iframe width="788.54" height="443" src="https://www.youtube.com/embed/kDUANNvtOwE"
title="YouTube video player" frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
allowfullscreen></iframe>
</p>
<div style="margin-top: 2%">
<stripe-pricing-table pricing-table-id="prctbl_1MQtdYJMfY1fWGMszc4tx78j"
publishable-key="pk_live_51ITXBmJMfY1fWGMs2G0LAydJweIDMp2WaYocM0xyzdn03WaHUbMw6uxfVuktAkgpRyUql7tz7gF5OwdccEZLd6Ot00XX6tGoZx">
</stripe-pricing-table>
<stripe-pricing-table pricing-table-id="prctbl_1LpSqSJMfY1fWGMsxSNhPLsc"
publishable-key="pk_live_51ITXBmJMfY1fWGMs2G0LAydJweIDMp2WaYocM0xyzdn03WaHUbMw6uxfVuktAkgpRyUql7tz7gF5OwdccEZLd6Ot00XX6tGoZx">
</stripe-pricing-table>
<stripe-pricing-table pricing-table-id="prctbl_1M6WpCJMfY1fWGMsQXFlZWcW"
publishable-key="pk_live_51ITXBmJMfY1fWGMs2G0LAydJweIDMp2WaYocM0xyzdn03WaHUbMw6uxfVuktAkgpRyUql7tz7gF5OwdccEZLd6Ot00XX6tGoZx">
</stripe-pricing-table>
</div>
</div>
{% endif %}
{% endblock %}

View File

@@ -5,16 +5,20 @@ urlpatterns = [
url(r'^$', views.loadSSLHome, name='loadSSLHome'),
url(r'^manageSSL', views.manageSSL, name='manageSSL'),
url(r'^V2/manageSSLV2', views.manageSSLV2, name='manageSSLV2'),
url(r'^issueSSL', views.issueSSL, name='issueSSL'),
url(r'^sslForHostName', views.sslForHostName, name='sslForHostName'),
url(r'^V2/sslForHostNameV2', views.sslForHostNameV2, name='sslForHostNameV2'),
url(r'^obtainHostNameSSL$', views.obtainHostNameSSL, name='obtainHostNameSSL'),
url(r'^sslForMailServer', views.sslForMailServer, name='sslForMailServer'),
url(r'^V2/sslForMailServerV2', views.sslForMailServerV2, name='sslForMailServerV2'),
url(r'^obtainMailServerSSL', views.obtainMailServerSSL, name='obtainMailServerSSL'),
## v2 functions
url(r'^v2ManageSSL', views.v2ManageSSL, name='v2ManageSSL'),
url(r'^V2/v2ManageSSLV2', views.v2ManageSSLV2, name='v2ManageSSLV2'),
url(r'^v2IssueSSL', views.v2IssueSSL, name='v2IssueSSL'),
]
]

View File

@@ -9,6 +9,7 @@ import json
from plogical.acl import ACLManager
from plogical.processUtilities import ProcessUtilities
# Create your views here.
def loadSSLHome(request):
@@ -27,6 +28,16 @@ def manageSSL(request):
{'websiteList': websitesName}, 'manageSSL')
return proc.render()
def manageSSLV2(request):
userID = request.session['userID']
currentACL = ACLManager.loadedACL(userID)
websitesName = ACLManager.findAllSites(currentACL, userID)
proc = httpProc(request, 'manageSSL/manageSSLV2.html',
{'websiteList': websitesName}, 'manageSSL')
return proc.render()
def v2ManageSSL(request):
userID = request.session['userID']
currentACL = ACLManager.loadedACL(userID)
@@ -46,7 +57,6 @@ def v2ManageSSL(request):
DNS.ConfigureCloudflareInAcme(SAVED_CF_Key, SAVED_CF_Email)
data['SaveSuccess'] = 1
RetStatus, SAVED_CF_Key, SAVED_CF_Email = ACLManager.FetchCloudFlareAPIKeyFromAcme()
from plogical.dnsUtilities import DNS
DNS.ConfigurePowerDNSInAcme()
@@ -59,6 +69,39 @@ def v2ManageSSL(request):
data, 'manageSSL')
return proc.render()
def v2ManageSSLV2(request):
userID = request.session['userID']
currentACL = ACLManager.loadedACL(userID)
websitesName = ACLManager.findAllSites(currentACL, userID)
data = {}
if ACLManager.CheckForPremFeature('all'):
data['PremStat'] = 1
else:
data['PremStat'] = 0
if request.method == 'POST':
SAVED_CF_Key = request.POST.get('SAVED_CF_Key')
SAVED_CF_Email = request.POST.get('SAVED_CF_Email')
from plogical.dnsUtilities import DNS
DNS.ConfigureCloudflareInAcme(SAVED_CF_Key, SAVED_CF_Email)
data['SaveSuccess'] = 1
RetStatus, SAVED_CF_Key, SAVED_CF_Email = ACLManager.FetchCloudFlareAPIKeyFromAcme()
from plogical.dnsUtilities import DNS
DNS.ConfigurePowerDNSInAcme()
data['SAVED_CF_Key'] = SAVED_CF_Key
data['SAVED_CF_Email'] = SAVED_CF_Email
data['websiteList'] = websitesName
proc = httpProc(request, 'manageSSL/v2ManageSSLV2.html',
data, 'manageSSL')
return proc.render()
def v2IssueSSL(request):
try:
userID = request.session['userID']
@@ -202,6 +245,15 @@ def sslForHostName(request):
return proc.render()
def sslForHostNameV2(request):
userID = request.session['userID']
currentACL = ACLManager.loadedACL(userID)
websitesName = ACLManager.findAllSites(currentACL, userID, 1)
proc = httpProc(request, 'manageSSL/sslForHostNameV2.html',
{'websiteList': websitesName}, 'hostnameSSL')
return proc.render()
def obtainHostNameSSL(request):
try:
userID = request.session['userID']
@@ -277,6 +329,18 @@ def sslForMailServer(request):
return proc.render()
def sslForMailServerV2(request):
userID = request.session['userID']
currentACL = ACLManager.loadedACL(userID)
websitesName = ACLManager.findAllSites(currentACL, userID)
websitesName = websitesName + ACLManager.findChildDomains(websitesName)
proc = httpProc(request, 'manageSSL/sslForMailServerV2.html',
{'websiteList': websitesName}, 'mailServerSSL')
return proc.render()
def obtainMailServerSSL(request):
try:
userID = request.session['userID']