mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-11 23:07:12 +00:00
Monotone-Parent: 7b6ad79fde0791f201e8b98eb957ded1410de5c1
Monotone-Revision: 7576485920bab942eaccc45f2ab5b1914255643d Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-04-20T21:30:17 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
1 parent
769979d8d5
commit
b7067eec65
25 files changed
+68
-59
No files matched your search
@@ -20,6 +20,8 @@
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <ldap.h>
|
||||
|
||||
#import <Foundation/NSArray.h>
|
||||
#import <Foundation/NSDictionary.h>
|
||||
#import <Foundation/NSString.h>
|
||||
@@ -123,12 +125,12 @@ static NSArray *commonSearchFields;
|
||||
}
|
||||
|
||||
+ (id) sourceFromUDSource: (NSDictionary *) udSource
|
||||
inDomain: (NSString *) domain
|
||||
inDomain: (NSString *) sourceDomain
|
||||
{
|
||||
id newSource;
|
||||
|
||||
newSource = [[self alloc] initFromUDSource: udSource
|
||||
inDomain: domain];
|
||||
inDomain: sourceDomain];
|
||||
[newSource autorelease];
|
||||
|
||||
return newSource;
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
#import <Foundation/NSArray.h>
|
||||
#import <Foundation/NSBundle.h>
|
||||
#import <Foundation/NSEnumerator.h>
|
||||
#import <Foundation/NSString.h>
|
||||
|
||||
#import <NGObjWeb/WOContext+SoObjects.h>
|
||||
|
||||
@@ -87,11 +87,11 @@
|
||||
{
|
||||
SOGoCASSession *session;
|
||||
SOGoCache *cache;
|
||||
NSString *ticket;
|
||||
NSString *casTicket;
|
||||
|
||||
cache = [SOGoCache sharedCache];
|
||||
ticket = [cache CASTicketFromIdentifier: identifier];
|
||||
session = [self CASSessionWithTicket: ticket];
|
||||
casTicket = [cache CASTicketFromIdentifier: identifier];
|
||||
session = [self CASSessionWithTicket: casTicket];
|
||||
|
||||
return session;
|
||||
}
|
||||
@@ -303,13 +303,11 @@
|
||||
|
||||
- (void) _parseDOMResponse: (NGDOMDocument *) response
|
||||
{
|
||||
NGDOMElement *top;
|
||||
id <DOMNodeList> nodes;
|
||||
NGDOMElement *currentNode;
|
||||
int count, max;
|
||||
|
||||
top = [response documentElement];
|
||||
nodes = [top childNodes];
|
||||
nodes = [[response documentElement] childNodes];
|
||||
max = [nodes length];
|
||||
for (count = 0; count < max; count++)
|
||||
{
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
*/
|
||||
|
||||
#import <Foundation/NSArray.h>
|
||||
#import <Foundation/NSData.h>
|
||||
#import <Foundation/NSDictionary.h>
|
||||
#import <Foundation/NSException.h>
|
||||
#import <Foundation/NSString.h>
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#import <Foundation/NSValue.h>
|
||||
|
||||
#import <NGObjWeb/WOContext.h>
|
||||
#import <NGObjWeb/WORequest.h>
|
||||
#import <NGObjWeb/SoWebDAVValue.h>
|
||||
|
||||
#import <NGExtensions/NSObject+Logs.h>
|
||||
@@ -65,22 +66,22 @@
|
||||
|
||||
+ (SOGoWebDAVAclManager *) webdavAclManager
|
||||
{
|
||||
static SOGoWebDAVAclManager *webdavAclManager = nil;
|
||||
static SOGoWebDAVAclManager *aclManager = nil;
|
||||
|
||||
if (!webdavAclManager)
|
||||
if (!aclManager)
|
||||
{
|
||||
webdavAclManager = [SOGoWebDAVAclManager new];
|
||||
[webdavAclManager registerDAVPermission: davElement (@"read", XMLNS_WEBDAV)
|
||||
aclManager = [SOGoWebDAVAclManager new];
|
||||
[aclManager registerDAVPermission: davElement (@"read", XMLNS_WEBDAV)
|
||||
abstract: YES
|
||||
withEquivalent: SoPerm_WebDAVAccess
|
||||
asChildOf: davElement (@"all", XMLNS_WEBDAV)];
|
||||
[webdavAclManager registerDAVPermission: davElement (@"read-current-user-privilege-set", XMLNS_WEBDAV)
|
||||
[aclManager registerDAVPermission: davElement (@"read-current-user-privilege-set", XMLNS_WEBDAV)
|
||||
abstract: YES
|
||||
withEquivalent: nil
|
||||
asChildOf: davElement (@"read", XMLNS_WEBDAV)];
|
||||
}
|
||||
|
||||
return webdavAclManager;
|
||||
return aclManager;
|
||||
}
|
||||
|
||||
- (id) init
|
||||
|
||||
@@ -156,13 +156,13 @@ static NSArray *childRecordFields = nil;
|
||||
id newFolder;
|
||||
NSArray *elements, *pathElements;
|
||||
NSString *path, *objectPath, *login, *currentUser, *ocsName, *folderName;
|
||||
WOContext *context;
|
||||
BOOL isSubscription;
|
||||
WOContext *localContext;
|
||||
BOOL localIsSubscription;
|
||||
|
||||
elements = [reference componentsSeparatedByString: @":"];
|
||||
login = [elements objectAtIndex: 0];
|
||||
context = [[WOApplication application] context];
|
||||
currentUser = [[context activeUser] login];
|
||||
localContext = [[WOApplication application] context];
|
||||
currentUser = [[localContext activeUser] login];
|
||||
objectPath = [elements objectAtIndex: 1];
|
||||
pathElements = [objectPath componentsSeparatedByString: @"/"];
|
||||
if ([pathElements count] > 1)
|
||||
@@ -177,8 +177,9 @@ static NSArray *childRecordFields = nil;
|
||||
newFolder = [self objectWithName: folderName inContainer: aContainer];
|
||||
[newFolder setOCSPath: path];
|
||||
[newFolder setOwner: login];
|
||||
isSubscription = ![login isEqualToString: [aContainer ownerInContext: context]];
|
||||
[newFolder setIsSubscription: isSubscription];
|
||||
localIsSubscription = ![login isEqualToString:
|
||||
[aContainer ownerInContext: localContext]];
|
||||
[newFolder setIsSubscription: localIsSubscription];
|
||||
if (![newFolder displayName])
|
||||
newFolder = nil;
|
||||
|
||||
|
||||
@@ -31,12 +31,14 @@
|
||||
@class NSString;
|
||||
@class NGLdapEntry;
|
||||
|
||||
@protocol SOGoSource;
|
||||
|
||||
@interface SOGoGroup : NSObject
|
||||
{
|
||||
@private
|
||||
NSString *_identifier;
|
||||
NGLdapEntry *_entry;
|
||||
LDAPSource *_source;
|
||||
NSObject <SOGoSource> *_source;
|
||||
NSMutableArray *_members;
|
||||
}
|
||||
|
||||
|
||||
@@ -1391,7 +1391,7 @@
|
||||
}
|
||||
|
||||
- (NSException *) davSetProperties: (NSDictionary *) setProps
|
||||
removePropertiesNamed: (NSDictionary *) removedProps
|
||||
removePropertiesNamed: (NSArray *) removedProps
|
||||
inContext: (WOContext *) localContext
|
||||
{
|
||||
NSString *currentProp;
|
||||
|
||||
@@ -35,9 +35,12 @@
|
||||
#import <GDLContentStore/GCSFolderManager.h>
|
||||
#import <GDLContentStore/NSURL+GCS.h>
|
||||
#import <GDLAccess/EOAdaptorChannel.h>
|
||||
#import <DOM/DOMElement.h>
|
||||
#import <DOM/DOMProtocols.h>
|
||||
#import <SaxObjC/XMLNamespaces.h>
|
||||
|
||||
#import <SOGo/SOGoUserSettings.h>
|
||||
|
||||
#import "NSObject+DAV.h"
|
||||
#import "SOGoGCSFolder.h"
|
||||
#import "SOGoPermissions.h"
|
||||
|
||||
@@ -134,9 +134,6 @@
|
||||
- (SOGoAppointmentFolder *)
|
||||
personalCalendarFolderInContext: (WOContext *) context;
|
||||
|
||||
- (NSArray *) rolesForObject: (NSObject *) object
|
||||
inContext: (WOContext *) context;
|
||||
|
||||
@end
|
||||
|
||||
#endif /* __SOGoUser_H__ */
|
||||
@@ -36,6 +36,8 @@
|
||||
#import <NGExtensions/NSNull+misc.h>
|
||||
#import <NGExtensions/NSObject+Logs.h>
|
||||
|
||||
#import <Appointments/SOGoAppointmentFolders.h>
|
||||
|
||||
#import "NSArray+Utilities.h"
|
||||
#import "SOGoCache.h"
|
||||
#import "SOGoDateFormatter.h"
|
||||
|
||||
@@ -49,7 +49,7 @@ NSString *SOGoWeekStartFirstFullWeek = @"FirstFullWeek";
|
||||
{
|
||||
SOGoUserProfile *up;
|
||||
SOGoUserDefaults *ud;
|
||||
SOGoDefaultsSource *parentSource;
|
||||
SOGoDefaultsSource *parent;
|
||||
static Class SOGoUserProfileKlass = Nil;
|
||||
|
||||
if (!SOGoUserProfileKlass)
|
||||
@@ -82,12 +82,11 @@ NSString *SOGoWeekStartFirstFullWeek = @"FirstFullWeek";
|
||||
// [self invalidateLanguage];
|
||||
// }
|
||||
|
||||
parentSource = [SOGoDomainDefaults defaultsForDomain: domainId];
|
||||
if (!parentSource)
|
||||
parentSource = [SOGoSystemDefaults sharedSystemDefaults];
|
||||
parent = [SOGoDomainDefaults defaultsForDomain: domainId];
|
||||
if (!parent)
|
||||
parent = [SOGoSystemDefaults sharedSystemDefaults];
|
||||
|
||||
ud = [self defaultsSourceWithSource: up
|
||||
andParentSource: parentSource];
|
||||
ud = [self defaultsSourceWithSource: up andParentSource: parent];
|
||||
|
||||
return ud;
|
||||
}
|
||||
|
||||
@@ -45,8 +45,6 @@
|
||||
|
||||
/* ownership */
|
||||
|
||||
- (NSString *) ownerInContext: (WOContext *) _ctx;
|
||||
|
||||
- (NSArray *) foldersOfType: (NSString *) folderType
|
||||
forUID: (NSString *) uid;
|
||||
- (NSDictionary *) foldersOfType: (NSString *) type
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
*/
|
||||
|
||||
#import <Foundation/NSArray.h>
|
||||
#import <Foundation/NSDictionary.h>
|
||||
#import <Foundation/NSString.h>
|
||||
|
||||
#import "SOGoUserProfile.h"
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
memset(md, 0, MD5_DIGEST_LENGTH);
|
||||
memset(buf, 0, 80);
|
||||
|
||||
EVP_Digest([plainPassword UTF8String], strlen([plainPassword UTF8String]), md, NULL, EVP_md5(), NULL);
|
||||
EVP_Digest((const void *) [plainPassword UTF8String], strlen([plainPassword UTF8String]), md, NULL, EVP_md5(), NULL);
|
||||
for (i = 0; i < MD5_DIGEST_LENGTH; i++)
|
||||
sprintf(&(buf[i*2]), "%02x", md[i]);
|
||||
|
||||
|
||||
Reference in new issue
Block a user