Monotone-Parent: 35e3135027040fead1c91041394159c3adecf931

Monotone-Revision: b97dac121b3e91b85aa6501ada5f0c990f1a4023

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2008-02-07T20:24:22
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2008-02-07 20:24:22 +00:00
parent db9ca6854a
commit 8a6faa594c
3 changed files with 33 additions and 20 deletions

View File

@@ -1,5 +1,16 @@
2008-02-07 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/SOGo/SOGoUserFolder.m ([-login]): removed useless
method.
([SOGoUserFolder -ownerInContext:_ctx]): compute the owner name
from a SOGoUser instance initialized with the nameInContainer as
initial login name. This way, all the objects belonging to the
corresponding user will be accessible with all the fields
mentionned in the "bindFields" LDAP settings value.
([SOGoUserFolder -privateCalendars:keyinContext:localContext])
([SOGoUserFolder -privateContacts:_keyinContext:_ctx]): use -[self
ownerInContext:] to determine the OCS path.
* SoObjects/Mailer/SOGoSharedMailAccount.[hm]: removed useless
module.

View File

@@ -43,10 +43,6 @@
@interface SOGoUserFolder : SOGoFolder
/* accessors */
- (NSString *) login;
/* ownership */
- (NSString *) ownerInContext: (WOContext *) _ctx;

View File

@@ -66,13 +66,6 @@
// [sInfo declareRoles: basicRoles asDefaultForPermission: SoPerm_WebDAVAccess];
// }
/* accessors */
- (NSString *) login
{
return nameInContainer;
}
/* hierarchy */
- (NSArray *) toManyRelationshipKeys
@@ -97,7 +90,15 @@
- (NSString *) ownerInContext: (WOContext *) _ctx
{
return nameInContainer;
SOGoUser *ownerUser;
if (!owner)
{
ownerUser = [SOGoUser userWithLogin: nameInContainer roles: nil];
owner = [ownerUser login];
}
return owner;
}
/* looking up shared objects */
@@ -327,14 +328,17 @@
// : [super permissionForKey: key]);
// }
- (SOGoAppointmentFolders *) privateCalendars: (NSString *) _key
inContext: (WOContext *) _ctx
- (SOGoAppointmentFolders *) privateCalendars: (NSString *) key
inContext: (WOContext *) localContext
{
SOGoAppointmentFolders *calendars;
calendars = [$(@"SOGoAppointmentFolders") objectWithName: _key inContainer: self];
[calendars setBaseOCSPath: [NSString stringWithFormat: @"/Users/%@/Calendar",
nameInContainer]];
NSString *baseOCSPath;
calendars = [$(@"SOGoAppointmentFolders") objectWithName: key
inContainer: self];
baseOCSPath = [NSString stringWithFormat: @"/Users/%@/Calendar",
[self ownerInContext: nil]];
[calendars setBaseOCSPath: baseOCSPath];
return calendars;
}
@@ -343,10 +347,12 @@
inContext: (WOContext *) _ctx
{
SOGoContactFolders *contacts;
NSString *baseOCSPath;
contacts = [$(@"SOGoContactFolders") objectWithName:_key inContainer: self];
[contacts setBaseOCSPath: [NSString stringWithFormat: @"/Users/%@/Contacts",
nameInContainer]];
baseOCSPath = [NSString stringWithFormat: @"/Users/%@/Contacts",
[self ownerInContext: nil]];
[contacts setBaseOCSPath: baseOCSPath];
return contacts;
}