mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-16 08:55:24 +00:00
Monotone-Parent: 4e23e038f2b0b7eddf8b30700b8c9a8910768f98
Monotone-Revision: 9235e5dc4d151a3cba8ad842ac39e1b2d18c8201 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-01-29T19:55:21 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
|
||||
#import "MAPIStoreContext.h"
|
||||
#import "MAPIStoreTypes.h"
|
||||
#import "MAPIStoreUserContext.h"
|
||||
#import "NSData+MAPIStore.h"
|
||||
#import "NSDate+MAPIStore.h"
|
||||
#import "NSString+MAPIStore.h"
|
||||
@@ -46,33 +47,22 @@
|
||||
|
||||
@implementation MAPIStoreGCSFolder
|
||||
|
||||
- (id) initWithURL: (NSURL *) newURL
|
||||
inContext: (MAPIStoreContext *) newContext
|
||||
- (id) initWithSOGoObject: (id) newSOGoObject
|
||||
inContainer: (MAPIStoreObject *) newContainer
|
||||
{
|
||||
if ((self = [super initWithURL: newURL
|
||||
inContext: newContext]))
|
||||
if ((self = [super initWithSOGoObject: newSOGoObject inContainer: newContainer]))
|
||||
{
|
||||
ASSIGN (versionsMessage,
|
||||
[SOGoMAPIFSMessage objectWithName: @"versions.plist"
|
||||
inContainer: propsFolder]);
|
||||
activeUserRoles = nil;
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (id) initWithSOGoObject: (id) newSOGoObject
|
||||
inContainer: (MAPIStoreObject *) newContainer
|
||||
- (void) setupVersionsMessage
|
||||
{
|
||||
if ((self = [super initWithSOGoObject: newSOGoObject inContainer: newContainer]))
|
||||
{
|
||||
ASSIGN (versionsMessage,
|
||||
[SOGoMAPIFSMessage objectWithName: @"versions.plist"
|
||||
inContainer: propsFolder]);
|
||||
activeUserRoles = nil;
|
||||
}
|
||||
|
||||
return self;
|
||||
ASSIGN (versionsMessage,
|
||||
[SOGoMAPIFSMessage objectWithName: @"versions.plist"
|
||||
inContainer: propsFolder]);
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
@@ -86,6 +76,7 @@
|
||||
andSortOrderings: (NSArray *) sortOrderings
|
||||
{
|
||||
static NSArray *fields = nil;
|
||||
SOGoUser *ownerUser;
|
||||
NSArray *records;
|
||||
NSMutableArray *qualifierArray;
|
||||
EOQualifier *fetchQualifier, *aclQualifier;
|
||||
@@ -98,7 +89,8 @@
|
||||
initWithObjects: @"c_name", @"c_version", nil];
|
||||
|
||||
qualifierArray = [NSMutableArray new];
|
||||
if (![[context activeUser] isEqual: [context ownerUser]])
|
||||
ownerUser = [[self userContext] sogoUser];
|
||||
if (![[context activeUser] isEqual: ownerUser])
|
||||
{
|
||||
aclQualifier = [self aclQualifier];
|
||||
if (aclQualifier)
|
||||
@@ -528,12 +520,14 @@
|
||||
- (NSArray *) activeUserRoles
|
||||
{
|
||||
SOGoUser *activeUser;
|
||||
WOContext *woContext;
|
||||
|
||||
if (!activeUserRoles)
|
||||
{
|
||||
activeUser = [[self context] activeUser];
|
||||
woContext = [[self userContext] woContext];
|
||||
activeUserRoles = [activeUser rolesForObject: sogoObject
|
||||
inContext: [context woContext]];
|
||||
inContext: woContext];
|
||||
[activeUserRoles retain];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user