diff --git a/CyberCP/settings.py b/CyberCP/settings.py
index 74ed50b4a..a83820428 100755
--- a/CyberCP/settings.py
+++ b/CyberCP/settings.py
@@ -24,7 +24,7 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRET_KEY = 'xr%j*p!*$0d%(-(e%@-*hyoz4$f%y77coq0u)6pwmjg4)q&19f'
# SECURITY WARNING: don't run with debug turned on in production!
-DEBUG = False
+DEBUG = True
ALLOWED_HOSTS = ['*']
diff --git a/CyberCP/urls.py b/CyberCP/urls.py
index a84fe83f7..fa96265c1 100755
--- a/CyberCP/urls.py
+++ b/CyberCP/urls.py
@@ -35,6 +35,7 @@ urlpatterns = [
url(r'^manageSSL/',include('manageSSL.urls')),
url(r'^api/',include('api.urls')),
url(r'^filemanager/',include('filemanager.urls')),
+ url(r'^filemanagerv2/',include('filemanager.urlv2')),
url(r'^emailPremium/',include('emailPremium.urls')),
url(r'^manageservices/',include('manageServices.urls')),
url(r'^plugins/',include('pluginHolder.urls')),
diff --git a/filemanager/templates/filemanager/indexv2.html b/filemanager/templates/filemanager/indexv2.html
new file mode 100644
index 000000000..d2e2e89cd
--- /dev/null
+++ b/filemanager/templates/filemanager/indexv2.html
@@ -0,0 +1 @@
+
habbi test
\ No newline at end of file
diff --git a/filemanager/urls.py b/filemanager/urls.py
index b0de804e6..2e02a499e 100755
--- a/filemanager/urls.py
+++ b/filemanager/urls.py
@@ -9,8 +9,6 @@ urlpatterns = [
url(r'^RootDownloadFile$',views.RootDownloadFile, name='RootDownloadFile'),
url(r'^editFile$', views.editFile, name='editFile'),
url('^Filemanager', views.FileManagerRoot, name='Filemanager'),
- url('^V2/FilemanagerV2', views.FileManagerRootV2, name='FilemanagerV2'),
url(r'^(?P(.*))$', views.loadFileManagerHome, name='loadFileManagerHome'),
-
]
diff --git a/filemanager/urlv2.py b/filemanager/urlv2.py
new file mode 100644
index 000000000..db8749423
--- /dev/null
+++ b/filemanager/urlv2.py
@@ -0,0 +1,9 @@
+from django.conf.urls import url
+from . import views
+
+urlpatterns = [
+
+ url(r'^(?P(.*))$', views.loadFileManagerHomeV2, name='loadFileManagerHomeV2'),
+
+]
+
diff --git a/filemanager/views.py b/filemanager/views.py
index 6a14bb718..ea22ed1c9 100755
--- a/filemanager/views.py
+++ b/filemanager/views.py
@@ -29,6 +29,23 @@ def loadFileManagerHome(request, domain):
except KeyError:
return redirect(loadLoginPage)
+def loadFileManagerHomeV2(request, domain):
+ try:
+ userID = request.session['userID']
+ if Websites.objects.filter(domain=domain).exists():
+ admin = Administrator.objects.get(pk=userID)
+ currentACL = ACLManager.loadedACL(userID)
+
+ if ACLManager.checkOwnership(domain, admin, currentACL) == 1:
+ return render(request, 'filemanager/indexv2.html', {'domainName': domain})
+ else:
+ return ACLManager.loadError()
+ else:
+ return HttpResponse("Domain does not exists.")
+
+ except KeyError:
+ return redirect(loadLoginPage)
+
def changePermissions(request):
try:
@@ -250,55 +267,7 @@ def FileManagerRoot(request):
return proc.render()
-def FileManagerRootV2(request):
- ### Load Custom CSS
- try:
- from baseTemplate.models import CyberPanelCosmetic
- cosmetic = CyberPanelCosmetic.objects.get(pk=1)
- except:
- from baseTemplate.models import CyberPanelCosmetic
- cosmetic = CyberPanelCosmetic()
- cosmetic.save()
- userID = request.session['userID']
- currentACL = ACLManager.loadedACL(userID)
- ipFile = "/etc/cyberpanel/machineIP"
- f = open(ipFile)
- ipData = f.read()
- ipAddressLocal = ipData.split('\n', 1)[0]
-
- try:
-
- from plogical.processUtilities import ProcessUtilities
- if ProcessUtilities.decideServer() == ProcessUtilities.OLS:
-
- url = "https://platform.cyberpersons.com/CyberpanelAdOns/Adonpermission"
- data = {
- "name": "Filemanager",
- "IP": ipAddressLocal
- }
-
- import requests
- response = requests.post(url, data=json.dumps(data))
- Status = response.json()['status']
-
- if (Status == 1):
- template = 'baseTemplate/FileManagerV2.html'
- else:
- return redirect("https://cyberpanel.net/cyberpanel-addons")
- else:
- template = 'baseTemplate/FileManagerV2.html'
- except BaseException as msg:
- template = 'baseTemplate/FileManagerV2.html'
-
- if currentACL['admin'] == 1:
- pass
- else:
- return ACLManager.loadErrorJson('FilemanagerAdmin', 0)
-
- from plogical.httpProc import httpProc
- proc = httpProc(request, template)
- return proc.render()
def downloadFile(request):
diff --git a/upgrade.sh b/upgrade.sh
index 2424f55b8..b387b67c7 100755
--- a/upgrade.sh
+++ b/upgrade.sh
@@ -15,4 +15,4 @@ find /usr/local/CyberCP -type f -exec chmod 0644 {} \;
chmod -R 755 /usr/local/CyberCP/bin
chown -R root:root /usr/local/CyberCP
chown -R lscpd:lscpd /usr/local/CyberCP/public/phpmyadmin/tmp
-systemctl restart lscpd
+systemctl restart lscpd
\ No newline at end of file
diff --git a/websiteFunctions/static/websiteFunctions/websiteFunctionsV2.js b/websiteFunctions/static/websiteFunctions/websiteFunctionsV2.js
index 78caed581..25df002db 100644
--- a/websiteFunctions/static/websiteFunctions/websiteFunctionsV2.js
+++ b/websiteFunctions/static/websiteFunctions/websiteFunctionsV2.js
@@ -463,9 +463,9 @@ newapp.controller('websitePagesV2', function ($scope, $http, $timeout, $window)
$scope.hideLogs = true;
};
- $scope.fileManagerURLV2 = "/filemanager/" + $("#domainNamePageV2").text();
- $scope.wordPressInstallURLV2 = $("#domainNamePageV2").text() + "/wordpressInstallV2";
- $scope.joomlaInstallURLV2 = $("#domainNamePageV2").text() + "/joomlaInstallV2";
+ $scope.fileManagerURLV2 = "/filemanagerv2/" + $("#domainNamePageV2").text() ;
+ $scope.wordPressInstallURLV2 = $("#domainNamePageV2").text() + "/wordpressInstall";
+ $scope.joomlaInstallURLV2 = $("#domainNamePageV2").text() + "/joomlaInstall";
$scope.setupGitV2 = $("#domainNamePageV2").text() + "/setupGitV2";
$scope.installPrestaURLV2 = $("#domainNamePageV2").text() + "/installPrestaShopV2";
$scope.installMagentoURLV2 = $("#domainNamePageV2").text() + "/installMagentoV2";
diff --git a/websiteFunctions/templates/websiteFunctions/listWebsiteV2.html b/websiteFunctions/templates/websiteFunctions/listWebsiteV2.html
index efc12f457..e20f8e3b5 100644
--- a/websiteFunctions/templates/websiteFunctions/listWebsiteV2.html
+++ b/websiteFunctions/templates/websiteFunctions/listWebsiteV2.html
@@ -73,7 +73,7 @@
|
-
+
|