mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-20 06:03:20 +00:00
Monotone-Parent: fc0b62f31661ab035a0e7790a8a09254faa2dfb3
Monotone-Revision: 27f1e1f9632b75ace73a3fa46bc3555f0b58fd1a Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2006-12-20T16:43:55 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2006-12-20 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* UI/Common/UIxAclEditor.m ([UIxAclEditor -saveAclsAction]): added
|
||||
code to handle the publishing of freebusy information.
|
||||
|
||||
2006-12-19 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* UI/Scheduler/UIxCalMainView.m ([UIxCalMainView
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
{
|
||||
acls = nil;
|
||||
prepared = NO;
|
||||
publishInFreeBusy = NO;
|
||||
users = [NSMutableArray new];
|
||||
checkedUsers = [NSMutableArray new];
|
||||
ownerCN = nil;
|
||||
@@ -94,7 +95,9 @@
|
||||
while (currentAcl)
|
||||
{
|
||||
currentUID = [currentAcl objectForKey: @"c_uid"];
|
||||
if (![currentUID isEqualToString: @"freebusy"])
|
||||
if ([currentUID isEqualToString: @"freebusy"])
|
||||
publishInFreeBusy = YES;
|
||||
else
|
||||
{
|
||||
currentUser = [um iCalPersonWithUid: currentUID];
|
||||
if (![[currentUser cn] isEqualToString: [self ownerCN]])
|
||||
@@ -127,15 +130,30 @@
|
||||
return checkedUsers;
|
||||
}
|
||||
|
||||
- (BOOL) publishInFreeBusy
|
||||
{
|
||||
if (!prepared)
|
||||
[self _prepareUsers];
|
||||
|
||||
return publishInFreeBusy;
|
||||
}
|
||||
|
||||
- (NSString *) toolbar
|
||||
{
|
||||
return (([[self ownerCN] isEqualToString: [[context activeUser] login]])
|
||||
? @"SOGoAclOwner.toolbar" : @"SOGoAclAssistant.toolbar");
|
||||
}
|
||||
|
||||
- (BOOL) clientIsCalendar
|
||||
{
|
||||
return [NSStringFromClass ([[self clientObject] class])
|
||||
isEqualToString: @"SOGoAppointmentFolder"];
|
||||
}
|
||||
|
||||
- (id) saveAclsAction
|
||||
{
|
||||
NSString *uids;
|
||||
NSArray *fbUsers;
|
||||
WORequest *request;
|
||||
SOGoAclsFolder *folder;
|
||||
SOGoObject *clientObject;
|
||||
@@ -151,6 +169,15 @@
|
||||
[folder setRoleForObject: clientObject
|
||||
forUsers: [uids componentsSeparatedByString: @","]
|
||||
to: SOGoRole_Assistant];
|
||||
if ([self clientIsCalendar]) {
|
||||
if ([[request formValueForKey: @"freebusy"] intValue])
|
||||
fbUsers = [NSArray arrayWithObject: @"freebusy"];
|
||||
else
|
||||
fbUsers = nil;
|
||||
[folder setRoleForObject: clientObject
|
||||
forUsers: fbUsers
|
||||
to: SOGoRole_FreeBusy];
|
||||
}
|
||||
|
||||
return [self jsCloseWithRefreshMethod: nil];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user