feature: allow users to manage ssh keys

This commit is contained in:
Usman Nasir
2020-10-25 10:07:50 +05:00
parent b815d10600
commit a749f71395
120 changed files with 18507 additions and 5400 deletions

View File

@@ -886,6 +886,30 @@ def fetchGitLogs(request):
except KeyError:
return redirect(loadLoginPage)
def getSSHConfigs(request):
try:
userID = request.session['userID']
wm = WebsiteManager()
return wm.getSSHConfigs(userID, json.loads(request.body))
except KeyError:
return redirect(loadLoginPage)
def deleteSSHKey(request):
try:
userID = request.session['userID']
wm = WebsiteManager()
return wm.deleteSSHKey(userID, json.loads(request.body))
except KeyError:
return redirect(loadLoginPage)
def addSSHKey(request):
try:
userID = request.session['userID']
wm = WebsiteManager()
return wm.addSSHKey(userID, json.loads(request.body))
except KeyError:
return redirect(loadLoginPage)
@csrf_exempt
def webhook(request, domain):
try: