mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-09-21 05:08:32 +00:00
Merge branch 'master' into feature-gdpr
This commit is contained in:
@@ -51,6 +51,7 @@
|
||||
#import <SoObjects/Contacts/SOGoContactGCSFolder.h>
|
||||
|
||||
#import <SOGo/NSString+Utilities.h>
|
||||
#import <SOGo/SOGoMobileProvision.h>
|
||||
|
||||
#import "UIxContactFolderActions.h"
|
||||
|
||||
@@ -463,4 +464,29 @@ static NSArray *photoTags = nil;
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (WOResponse *) mobileconfigAction
|
||||
{
|
||||
SOGoContactGCSFolder *folder;
|
||||
NSString *davURL, *plistContent, *disposition;
|
||||
WOResponse *response;
|
||||
|
||||
folder = [self clientObject];
|
||||
davURL = [folder davURLAsString];
|
||||
plistContent = [SOGoMobileProvision plistForContactsWithContext: context andPath: davURL andName: [NSString stringWithFormat: @"%@ - %@", [folder owner], [folder realNameInContainer]]];
|
||||
|
||||
if (nil != plistContent) {
|
||||
response = [self responseWithStatus: 200
|
||||
andString: plistContent];
|
||||
[response setHeader: @"application/x-plist; charset=utf-8"
|
||||
forKey: @"content-type"];
|
||||
disposition = [NSString stringWithString: @"attachment; filename=\"contacts.mobileconfig\""];
|
||||
[response setHeader: disposition forKey: @"Content-Disposition"];
|
||||
} else {
|
||||
response = [self responseWithStatus: 500
|
||||
andString: @"Error while generating profile"];
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
@end /* UIxContactFolderActions */
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
#import <SOGo/SOGoUser.h>
|
||||
#import <SOGo/SOGoUserDefaults.h>
|
||||
#import <SOGo/SOGoUserManager.h>
|
||||
#import <SOGo/SOGoMobileProvision.h>
|
||||
|
||||
#import <Contacts/NGVCard+SOGo.h>
|
||||
#import <Contacts/SOGoContactObject.h>
|
||||
@@ -450,29 +449,4 @@
|
||||
return [NSString stringWithFormat: @"%@/photo", [soURL absoluteString]];
|
||||
}
|
||||
|
||||
- (WOResponse *) mobileconfigAction
|
||||
{
|
||||
SOGoContactFolders *folders;
|
||||
NSString *davURL, *plistContent, *disposition;
|
||||
WOResponse *response;
|
||||
|
||||
folders = [self clientObject];
|
||||
davURL = [[folders container] davURLAsString];
|
||||
plistContent = [SOGoMobileProvision plistForContactsWithContext: context andPath: davURL];
|
||||
|
||||
if (nil != plistContent) {
|
||||
response = [self responseWithStatus: 200
|
||||
andString: plistContent];
|
||||
[response setHeader: @"application/x-plist; charset=utf-8"
|
||||
forKey: @"content-type"];
|
||||
disposition = [NSString stringWithString: @"attachment; filename=\"contacts.mobileconfig\""];
|
||||
[response setHeader: disposition forKey: @"Content-Disposition"];
|
||||
} else {
|
||||
response = [self responseWithStatus: 500
|
||||
andString: @"Error while generating profile"];
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
@end /* UIxContactView */
|
||||
|
||||
@@ -50,11 +50,6 @@
|
||||
pageName = "UIxContactFoldersView";
|
||||
actionName = "saveDragHandleState";
|
||||
};
|
||||
mobileconfig = {
|
||||
protectedBy = "Access Contents Information";
|
||||
actionClass = "UIxContactView";
|
||||
actionName = "mobileconfig";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -115,6 +110,11 @@
|
||||
pageName = "UIxContactFolderProperties";
|
||||
actionName = "saveProperties";
|
||||
};
|
||||
mobileconfig = {
|
||||
protectedBy = "Access Contents Information";
|
||||
actionClass = "UIxContactFolderActions";
|
||||
actionName = "mobileconfig";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -507,7 +507,7 @@
|
||||
"Let SOGo handle everything" = "Let SOGo handle everything";
|
||||
|
||||
/* Password Recovery */
|
||||
"Password recovery mode" = "Password recovery";
|
||||
"Password recovery mode" = "Password recovery mode";
|
||||
"Question" = "Question";
|
||||
"Secondary e-mail" = "Secondary e-mail";
|
||||
"Answer" = "Answer";
|
||||
|
||||
@@ -507,7 +507,7 @@
|
||||
"Let SOGo handle everything" = "Laissez SOGo s'occuper de tout";
|
||||
|
||||
/* Password Recovery */
|
||||
"Password recovery mode" = "Récupération de mot de passe";
|
||||
"Password recovery mode" = "Mode de récupération de mot de passe";
|
||||
"Question" = "Question";
|
||||
"Secondary e-mail" = "E-mail secondaire";
|
||||
"Answer" = "Réponse";
|
||||
|
||||
@@ -666,7 +666,7 @@
|
||||
|
||||
folders = [self clientObject];
|
||||
davURL = [[folders container] davURLAsString];
|
||||
plistContent = [SOGoMobileProvision plistForCalendarsWithContext: context andPath: davURL];
|
||||
plistContent = [SOGoMobileProvision plistForCalendarsWithContext: context andPath: davURL andName: [folders owner]];
|
||||
|
||||
if (nil != plistContent) {
|
||||
response = [self responseWithStatus: 200
|
||||
|
||||
@@ -205,6 +205,12 @@
|
||||
<var:string label:value="Export"/>
|
||||
</md-button>
|
||||
</md-menu-item>
|
||||
<md-menu-divider><!-- divider --></md-menu-divider>
|
||||
<md-menu-item>
|
||||
<md-button ng-click="folder.downloadProvisioningProfile()">
|
||||
<var:string label:value="Download configuration profile"/>
|
||||
</md-button>
|
||||
</md-menu-item>
|
||||
</md-menu-content>
|
||||
</md-menu>
|
||||
</md-list-item>
|
||||
|
||||
@@ -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