Monotone-Parent: 6a3c0d744d66748f11759bba747978f5e50b85d5
Monotone-Revision: 6c3973de5dad3f2478a806c7eb196f3a1a7d66a8 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-07-20T18:50:12 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
parent
3d698d0f91
commit
1585f25c2b
|
@ -1,5 +1,9 @@
|
||||||
2010-07-20 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
2010-07-20 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||||
|
|
||||||
|
* SoObjects/SOGo/SOGoUserFolder.m (_subFoldersFromFolder:): we
|
||||||
|
need to validate the current user's access to the listed folders
|
||||||
|
again because of the recent changes on SOGoParentFolder.
|
||||||
|
|
||||||
* UI/Contacts/UIxContactFoldersView.m (_subFoldersFromFolder:):
|
* UI/Contacts/UIxContactFoldersView.m (_subFoldersFromFolder:):
|
||||||
removed unused method.
|
removed unused method.
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
|
|
||||||
#import <NGObjWeb/NSException+HTTP.h>
|
#import <NGObjWeb/NSException+HTTP.h>
|
||||||
#import <NGObjWeb/SoClassSecurityInfo.h>
|
#import <NGObjWeb/SoClassSecurityInfo.h>
|
||||||
|
#import <NGObjWeb/SoSecurityManager.h>
|
||||||
#import <NGObjWeb/WOApplication.h>
|
#import <NGObjWeb/WOApplication.h>
|
||||||
#import <NGObjWeb/WOContext+SoObjects.h>
|
#import <NGObjWeb/WOContext+SoObjects.h>
|
||||||
#import <NGObjWeb/WORequest.h>
|
#import <NGObjWeb/WORequest.h>
|
||||||
|
@ -147,18 +148,27 @@
|
||||||
NSMutableArray *folders;
|
NSMutableArray *folders;
|
||||||
NSEnumerator *subfolders;
|
NSEnumerator *subfolders;
|
||||||
SOGoFolder *currentFolder;
|
SOGoFolder *currentFolder;
|
||||||
NSString *folderName;
|
NSString *folderName, *folderOwner;
|
||||||
Class subfolderClass;
|
Class subfolderClass;
|
||||||
NSMutableDictionary *currentDictionary;
|
NSMutableDictionary *currentDictionary;
|
||||||
|
SoSecurityManager *securityManager;
|
||||||
|
|
||||||
folders = [NSMutableArray array];
|
folders = [NSMutableArray array];
|
||||||
|
|
||||||
|
folderOwner = [parentFolder ownerInContext: context];
|
||||||
|
securityManager = [SoSecurityManager sharedSecurityManager];
|
||||||
|
|
||||||
subfolderClass = [[parentFolder class] subFolderClass];
|
subfolderClass = [[parentFolder class] subFolderClass];
|
||||||
|
|
||||||
subfolders = [[parentFolder subFolders] objectEnumerator];
|
subfolders = [[parentFolder subFolders] objectEnumerator];
|
||||||
while ((currentFolder = [subfolders nextObject]))
|
while ((currentFolder = [subfolders nextObject]))
|
||||||
{
|
{
|
||||||
if ([currentFolder isMemberOfClass: subfolderClass])
|
if (![securityManager validatePermission: SOGoPerm_AccessObject
|
||||||
|
onObject: currentFolder
|
||||||
|
inContext: context]
|
||||||
|
&& [[currentFolder ownerInContext: context]
|
||||||
|
isEqualToString: folderOwner]
|
||||||
|
&& [currentFolder isMemberOfClass: subfolderClass])
|
||||||
{
|
{
|
||||||
folderName = [NSString stringWithFormat: @"/%@/%@",
|
folderName = [NSString stringWithFormat: @"/%@/%@",
|
||||||
[parentFolder nameInContainer],
|
[parentFolder nameInContainer],
|
||||||
|
|
Loading…
Reference in a new issue