mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-11 00:08:51 +00:00
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:
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user