Monotone-Parent: 293e773bade06f97acb90961a13323cdf0e8bcd7

Monotone-Revision: 9f39b351dc2a5dbc00529892e9994ceff8f696d2

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2006-12-15T22:18:55
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2006-12-15 22:18:55 +00:00
parent 17a4faa5f6
commit ebd5a6cfb6
2 changed files with 34 additions and 0 deletions

View File

@@ -1,3 +1,11 @@
2006-12-15 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/Contacts/SOGoContactFolders.m ([SOGoContactFolders
-roleOfUser:uidinContext:context]): new method that returns
SOGoRole_Assistant when the user is an assistant or a delegate on
the "personal" ab object. This is so that setting roles on the
SOGoContactFolders object is not required.
2006-12-14 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* Main/SOGo.m: declare "Freebusy" permissions for the top objects.

View File

@@ -36,6 +36,8 @@
#import <NGObjWeb/WOContext+SoObjects.h>
#import <NGObjWeb/SoUser.h>
#import <SoObjects/SOGo/SOGoPermissions.h>
#import "common.h"
#import "SOGoContactGCSFolder.h"
@@ -164,6 +166,30 @@
return [contactFolders allValues];
}
- (NSString *) roleOfUser: (NSString *) uid
inContext: (WOContext *) context
{
NSArray *roles;
NSString *objectName, *role;
role = nil;
objectName = [[context objectForKey: @"SoRequestTraversalPath"]
objectAtIndex: 2];
if ([objectName isEqualToString: @"personal"])
{
roles = [[context activeUser]
rolesForObject: [self lookupName: objectName
inContext: context
acquire: NO]
inContext: context];
if ([roles containsObject: SOGoRole_Assistant]
|| [roles containsObject: SOGoRole_Delegate])
role = SOGoRole_Assistant;
}
return role;
}
- (BOOL) davIsCollection
{
return YES;