Monotone-Parent: eb2a31ca341c6716a5121507df99f820e15f17f2

Monotone-Revision: c204736a5f5dcfce7b1fd9db8327cbe1ff79c7aa

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-05-22T19:16:07
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2007-05-22 19:16:07 +00:00
parent a19c154873
commit c7545b5e9e
7 changed files with 11 additions and 36 deletions
+3
View File
@@ -1,5 +1,8 @@
2007-05-22 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/SOGo/SOGoObject.m ([SOGoObject -defaultAclRoles]):
removed method.
* SoObjects/SOGo/SOGoPermissions.m: added the new role
"SOGoMailRole_MessageEraser".
@@ -1296,13 +1296,4 @@ static NSNumber *sharedYes = nil;
return @"IPF.Appointment";
}
/* acls */
- (NSArray *) defaultAclRoles
{
return [NSArray arrayWithObjects:
SOGoCalendarRole_PublicViewer,
SOGoCalendarRole_ConfidentialDAndTViewer,
nil];
}
@end /* SOGoAppointmentFolder */
+8 -8
View File
@@ -39,6 +39,8 @@
#import "SOGoMailFolderDataSource.h"
#import "SOGoMailFolder.h"
static NSString *defaultUserID = @"anyone";
@implementation SOGoMailFolder
static BOOL useAltNamespace = NO;
@@ -428,16 +430,14 @@ static BOOL useAltNamespace = NO;
- (NSArray *) aclsForUser: (NSString *) uid
{
NSDictionary *imapAcls;
NSArray *userAcls;
imapAcls = [imap4 aclForMailboxAtURL: [self imap4URL]];
userAcls = [imapAcls objectForKey: uid];
if (!([userAcls count] || [uid isEqualToString: defaultUserID]))
userAcls = [imapAcls objectForKey: defaultUserID];
return [self _imapAclsToSOGoAcls: [imapAcls objectForKey: uid]];
}
- (NSArray *) defaultAclRoles
{
return [NSArray arrayWithObjects: SOGoRole_ObjectViewer,
SOGoRole_ObjectReader, SOGoMailRole_SeenKeeper, nil];
return [self _imapAclsToSOGoAcls: userAcls];
}
- (void) removeAclsForUsers: (NSArray *) users
@@ -471,7 +471,7 @@ static BOOL useAltNamespace = NO;
- (NSString *) defaultUserID
{
return @"anyone";
return defaultUserID;
}
- (BOOL) hasSupportForDefaultRoles
-6
View File
@@ -422,12 +422,6 @@ static NSString *defaultUserID = @"<default>";
}
/* acls */
- (NSArray *) defaultAclRoles
{
#warning this should be changed to something useful
return nil;
}
- (NSArray *) aclUsers
{
return [self aclUsersForObjectAtPath: [self pathArrayToSoObject]];
-1
View File
@@ -98,7 +98,6 @@
/* acls */
- (NSArray *) defaultAclRoles;
- (NSArray *) aclUsers;
- (NSArray *) aclsForUser: (NSString *) uid;
- (void) setRoles: (NSArray *) roles
-7
View File
@@ -719,13 +719,6 @@ static BOOL kontactGroupDAV = YES;
return nil;
}
- (NSArray *) defaultAclRoles
{
[self subclassResponsibility: _cmd];
return nil;
}
- (void) setRoles: (NSArray *) roles
forUser: (NSString *) uid
{
-5
View File
@@ -80,7 +80,6 @@
NSString *newUID;
LDAPUserManager *um;
SOGoObject *clientObject;
unsigned int count;
response = NO;
@@ -97,10 +96,6 @@
ASSIGN (uid, newUID);
clientObject = [self clientObject];
[userRights addObjectsFromArray: [clientObject aclsForUser: uid]];
count = [userRights count];
if (!count || (count == 1 && [[userRights objectAtIndex: 0]
isEqualToString: SOGoRole_None]))
[userRights setArray: [clientObject defaultAclRoles]];
response = YES;
}