From d9ddf89b32a1514248f0943e72f704a8bcb523e4 Mon Sep 17 00:00:00 2001 From: "B. Stack" Date: Thu, 19 May 2022 11:59:20 -0400 Subject: add perUserAdditionalResources support This allows per-user additional calendars, for viewing shared items. --- README-stackrpms.md | 3 +++ radicale_infcloud/web/config.js | 6 ++++- radicale_infcloud/web/webdav_protocol.js | 39 +++++++++++++++++++++++++++----- 3 files changed, 41 insertions(+), 7 deletions(-) diff --git a/README-stackrpms.md b/README-stackrpms.md index b0da7c5..a08639d 100644 --- a/README-stackrpms.md +++ b/README-stackrpms.md @@ -50,3 +50,6 @@ Relevant config options for radicale (file `/etc/radicale/config`) include: type = http_x_remote_user [web] type = internal + +## History +2022-05-19 patch added for perUserAdditionalResources in config.js. diff --git a/radicale_infcloud/web/config.js b/radicale_infcloud/web/config.js index b3b15f6..fd1c43a 100644 --- a/radicale_infcloud/web/config.js +++ b/radicale_infcloud/web/config.js @@ -347,7 +347,11 @@ var globalNetworkCheckSettings={ hrefLabel: null, forceReadOnly: null, ignoreAlarms: false, - backgroundCalendars: [] + backgroundCalendars: [], + perUserAdditionalResources: [ + { name: "bgstack15", allowed: ["name2","name3"] }, + { name: "name2", allowed: ["name4"] } + ] } diff --git a/radicale_infcloud/web/webdav_protocol.js b/radicale_infcloud/web/webdav_protocol.js index 93ce885..d64139c 100644 --- a/radicale_infcloud/web/webdav_protocol.js +++ b/radicale_infcloud/web/webdav_protocol.js @@ -18,6 +18,7 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ +// 2022-05-19 Stackrpms by removing all globalSettings.settingsAccount checks (but particularly at lines 1047, 1144, 1359), the "additionalResources" will load now. // VersionCheck (check for new version) function netVersionCheck() @@ -152,6 +153,30 @@ function netCheckAndCreateConfiguration(configurationURL) } } } + // stackrpms,23 Add perUserAdditionalResources feature + if(configurationURL.perUserAdditionalResources!=undefined && configurationURL.perUserAdditionalResources.length>0) + { + for(var j=0;j0) + { + for(var i=0;i'; } @@ -565,7 +590,7 @@ function DAVresourceDelegation(inputResource, index, lastIndex) }); } - if(typeof inputResource.extendedDelegation!='undefined' && inputResource.extendedDelegation && !settingsLoaded && inputResource.href.indexOf(globalLoginUsername)!=-1 && inputResource.settingsAccount && (globalSettings.settingstype.value=='' || globalSettings.settingstype.value==null || (globalSettings.settingstype.value!='' && globalSettings.settingstype.value!=null && globalSettings.settingstype.value=='principal-URL'))) + if(typeof inputResource.extendedDelegation!='undefined' && inputResource.extendedDelegation && !settingsLoaded && inputResource.href.indexOf(globalLoginUsername)!=-1 && (globalSettings.settingstype.value=='' || globalSettings.settingstype.value==null || (globalSettings.settingstype.value!='' && globalSettings.settingstype.value!=null && globalSettings.settingstype.value=='principal-URL'))) { var settings=$(xml.responseXML).children().filterNsNode('multistatus').children().filterNsNode('response').children().filterNsNode('propstat').children().filterNsNode('prop').children().filterNsNode('settings').text(); if(settings!='') @@ -747,6 +772,8 @@ function netFindResource(inputResource, inputResourceIndex, forceLoad, indexR, l if(globalSettings.activecalendarcollections.value.length>0 && globalVisibleCalDAVCollections.length==0) globalDefaultCalendarCollectionActiveAll=true; } + // stackrpms,2 This forces all calendars to turn on at initial load + globalDefaultCalendarCollectionActiveAll=true; if(globalDefaultCalendarCollectionActiveAll) for(var i=0; i