mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-20 22:23:19 +00:00
feat(core): Add mobile provisioning download for Apple's devices
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
#import <SOGo/SOGoUser.h>
|
||||
#import <SOGo/SOGoUserDefaults.h>
|
||||
#import <SOGo/SOGoUserSettings.h>
|
||||
#import <SOGo/SOGoMobileProvision.h>
|
||||
|
||||
#import <SOGoUI/SOGoAptFormatter.h>
|
||||
|
||||
@@ -657,4 +658,29 @@
|
||||
return r;
|
||||
}
|
||||
|
||||
- (WOResponse *) mobileconfigAction
|
||||
{
|
||||
SOGoAppointmentFolders *folders;
|
||||
NSString *davURL, *plistContent, *disposition;
|
||||
WOResponse *response;
|
||||
|
||||
folders = [self clientObject];
|
||||
davURL = [[folders container] davURLAsString];
|
||||
plistContent = [SOGoMobileProvision plistForCalendarsWithContext: 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=\"calendar.mobileconfig\""];
|
||||
[response setHeader: disposition forKey: @"Content-Disposition"];
|
||||
} else {
|
||||
response = [self responseWithStatus: 500
|
||||
andString: @"Error while generating profile"];
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
@end /* UIxCalView */
|
||||
|
||||
Reference in New Issue
Block a user