From c610f0da300df576995e900e65c7b72089b00763 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Wed, 28 Mar 2007 18:20:05 +0000 Subject: [PATCH] Monotone-Parent: 24ff1bd62261a24e843c0f320edf145b616d797d Monotone-Revision: 23b6e321c419c2dceeab0740f6617c507e8ce448 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-03-28T18:20:05 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 9 ++++++ UI/Scheduler/UIxCalMainView.m | 58 ----------------------------------- UI/Scheduler/product.plist | 5 --- 3 files changed, 9 insertions(+), 63 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7331f47af..d0aae3cc5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2007-03-28 Wolfgang Sourdeau + + * UI/Scheduler/UIxCalMainView.m ([UIxCalMainView + -checkRightsAction]): removed method. + + * UI/Common/UIxFolderActions.m ([UIxFolderActions + -canAccessContentAction]): new method designed to replace + [UIxCalMainView checkRightsAction] in a more universal way. + 2007-03-27 Wolfgang Sourdeau * SoObjects/Contacts/SOGoContactFolders.m ([SOGoContactFolders diff --git a/UI/Scheduler/UIxCalMainView.m b/UI/Scheduler/UIxCalMainView.m index fc2bcad5f..642f34714 100644 --- a/UI/Scheduler/UIxCalMainView.m +++ b/UI/Scheduler/UIxCalMainView.m @@ -130,62 +130,4 @@ static NSMutableArray *yearMenuItems = nil; return response; } -- (NSString *) _rightsForUIDs: (NSString *) uids -{ - NSEnumerator *ids; - NSString *uid; - NSMutableString *rights; - SOGoAppointmentFolder *refFolder, *currentFolder; - SoSecurityManager *securityManager; - BOOL result; - - securityManager = [SoSecurityManager sharedSecurityManager]; - refFolder = [self clientObject]; - - rights = [NSMutableString string]; - if ([uids length] > 0) - { - ids = [[uids componentsSeparatedByString: @","] objectEnumerator]; - uid = [ids nextObject]; - while (uid) - { - currentFolder - = [refFolder - lookupCalendarFolderForUID: (([uid hasPrefix: @"-"]) - ? [uid substringFromIndex: 1] - : uid)]; - result = (![securityManager validatePermission: SoPerm_AccessContentsInformation - onObject: currentFolder - inContext: context]); - if ([rights length] == 0) - [rights appendFormat: @"%d", result]; - else - [rights appendFormat: @",%d", result]; - uid = [ids nextObject]; - } - } - - return rights; -} - -- (id ) checkRightsAction -{ - WOResponse *response; - NSUserDefaults *ud; - NSString *uids, *rights; - - ud = [[context activeUser] userDefaults]; - uids = [ud stringForKey: @"calendaruids"]; - - response = [context response]; - [response setStatus: 200]; - [response setHeader: @"text/plain; charset=\"utf-8\"" - forKey: @"content-type"]; - - rights = [self _rightsForUIDs: uids]; - [response appendContentString: rights]; - - return response; -} - @end diff --git a/UI/Scheduler/product.plist b/UI/Scheduler/product.plist index 76ebf51a7..c96c9bfc4 100644 --- a/UI/Scheduler/product.plist +++ b/UI/Scheduler/product.plist @@ -102,11 +102,6 @@ pageName = "UIxCalMainView"; actionName = "updateCalendars"; }; - checkRights = { - protectedBy = "View"; - pageName = "UIxCalMainView"; - actionName = "checkRights"; - }; editAttendees = { protectedBy = "View"; pageName = "UIxAttendeesEditor";