Links angepasst

This commit is contained in:
holger.trampe 2021-07-30 14:42:58 +02:00
parent 7899b2004c
commit 57d8ba1121
7 changed files with 23 additions and 7 deletions

View File

@ -388,7 +388,7 @@ function updateGroupName(){
success: function( data ) success: function( data )
{ {
if(data['success']){ if(data['success']){
//window.location.href = window.location.href + "?showtoast=true"; window.location.href = window.location.href + "?showtoast=true";
$("#newGroup").modal("toggle"); $("#newGroup").modal("toggle");
} }
else{ else{

View File

@ -780,7 +780,7 @@ def SettingsAjaxRouter(request):
data = {"userid" : usertoremove.pk, "groupid" : aggroup.pk, "user_fname" : usertoremove.first_name, "user_lname" : usertoremove.last_name} data = {"userid" : usertoremove.pk, "groupid" : aggroup.pk, "user_fname" : usertoremove.first_name, "user_lname" : usertoremove.last_name}
# User add # User add
# NC ADD USER TO GROUP # NC REMOVE USER FROM GROUP
# first_name and last_name CHANGE - Update in NC as DisplayName # first_name and last_name CHANGE - Update in NC as DisplayName
headers = { headers = {
'Accept' : 'application/json', 'Accept' : 'application/json',

View File

@ -109,6 +109,10 @@ def checkUserDirRights(request, startdir, userid):
canview = False canview = False
return canview return canview
# NEW FOR NC
import requests
from django.conf import settings
from digitaleagentur.utils import *
@login_required @login_required
def StandardAdd(request, id=False): def StandardAdd(request, id=False):
@ -240,9 +244,21 @@ def StandardAdd(request, id=False):
else: else:
normalForm = StandardAddStandard(instance=request.user) normalForm = StandardAddStandard(instance=request.user)
editorForm = StandardAddStandardEditor(instance=request.user) editorForm = StandardAddStandardEditor(instance=request.user)
possibleFilesByVisible = [] possibleFilesByVisible = []
# NC FILE
# Data for the new User
if(request.user.is_authenticated and getNCLoggedUserBySession(request.COOKIES['nc_session_id'])):
data_nc = {
"Depth" : 0
}
nc_login_headers = {'Authorization' : 'Bearer ' + request.COOKIES['nc_session_id']}
r = requests.request("PROPFIND", settings.NEXTCLOUD_URL + "remote.php/dav/files/" + request.user.username + "/Agenturdaten_1/", headers=nc_login_headers, data=data_nc)
print(r.text)
allfiles = DataFile.objects.filter(agency=request.user.profile.agency) allfiles = DataFile.objects.filter(agency=request.user.profile.agency)

View File

@ -2,7 +2,7 @@
<script src="{%static 'users/js/jquery.js' %}" type="text/javascript"></script> <script src="{%static 'users/js/jquery.js' %}" type="text/javascript"></script>
<script> <script>
$(document).ready(function(){ $(document).ready(function(){
window.location.replace("http://localhost:8080/external/1"); window.location.replace("http://cloud.digitale-agentur.com/external/1");
localStorage.clear(); localStorage.clear();
}) })
</script> </script>

View File

@ -2,7 +2,7 @@
<script src="{%static 'users/js/jquery.js' %}" type="text/javascript"></script> <script src="{%static 'users/js/jquery.js' %}" type="text/javascript"></script>
<script> <script>
$(document).ready(function(){ $(document).ready(function(){
window.location.replace("http://localhost:8080/external/1"); window.location.replace("cloud.digitale-agentur.com/external/1");
localStorage.clear(); localStorage.clear();
}) })
</script> </script>

View File

@ -2,7 +2,7 @@
<script src="{%static 'users/js/jquery.js' %}" type="text/javascript"></script> <script src="{%static 'users/js/jquery.js' %}" type="text/javascript"></script>
<script> <script>
$(document).ready(function(){ $(document).ready(function(){
window.location.replace("http://localhost:8080/external/1"); window.location.replace("cloud.digitale-agentur.com/external/1");
localStorage.clear(); localStorage.clear();
}) })
</script> </script>

View File

@ -2,7 +2,7 @@
<script src="{%static 'users/js/jquery.js' %}" type="text/javascript"></script> <script src="{%static 'users/js/jquery.js' %}" type="text/javascript"></script>
<script> <script>
$(document).ready(function(){ $(document).ready(function(){
window.location.replace("http://localhost:8080/external/1"); window.location.replace("cloud.digitale-agentur.com/external/1");
localStorage.clear(); localStorage.clear();
}) })
</script> </script>