mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-06-06 19:09:43 +00:00
Merge branch 'master' into feature-gdpr
This commit is contained in:
@@ -756,14 +756,25 @@
|
||||
* @returns a promise of the HTTP operation
|
||||
*/
|
||||
AddressBook.prototype.downloadProvisioningProfile = function () {
|
||||
var options;
|
||||
var options, resource, index, ownerPaths, realOwnerId, path;
|
||||
|
||||
options = {
|
||||
type: 'application/octet-stream',
|
||||
filename: 'addressbook.mobileconfig'
|
||||
}
|
||||
|
||||
return AddressBook.$$resource.open('', 'mobileconfig', null, options);
|
||||
if (this.isSubscription) {
|
||||
index = this.urls.cardDavURL.indexOf('/dav/');
|
||||
ownerPaths = this.urls.cardDavURL.substring(index + 5).split(/\//);
|
||||
realOwnerId = ownerPaths[0];
|
||||
resource = AddressBook.$$resource.userResource(realOwnerId);
|
||||
path = ownerPaths[1] + '/' + ownerPaths[2];
|
||||
} else {
|
||||
resource = AddressBook.$$resource;
|
||||
path = this.id;
|
||||
}
|
||||
|
||||
return resource.open(path, 'mobileconfig', null, options);
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -583,14 +583,25 @@
|
||||
* @returns a promise of the HTTP operation
|
||||
*/
|
||||
Calendar.prototype.downloadProvisioningProfile = function () {
|
||||
var options;
|
||||
var options, resource, index, ownerPaths, realOwnerId, path;
|
||||
|
||||
options = {
|
||||
type: 'application/octet-stream',
|
||||
filename: 'calendar.mobileconfig'
|
||||
}
|
||||
|
||||
return Calendar.$$resource.open('', 'mobileconfig', null, options);
|
||||
if (this.isSubscription) {
|
||||
index = this.urls.webDavICSURL.indexOf('/dav/');
|
||||
ownerPaths = this.urls.webDavICSURL.substring(index + 5).split(/\//);
|
||||
realOwnerId = ownerPaths[0];
|
||||
resource = Calendar.$$resource.userResource(realOwnerId);
|
||||
path = 'Calendar';
|
||||
} else {
|
||||
resource = Calendar.$$resource;
|
||||
path = '';
|
||||
}
|
||||
|
||||
return resource.open(path, 'mobileconfig', null, options);
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user