From 74013564b1ddb4f70e3b323532c464d275791720 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Fri, 20 Jun 2008 04:11:41 +0000 Subject: [PATCH] Monotone-Parent: bb0d71310c5e05a41e1acc07768c6ec4c2b2b5fe Monotone-Revision: ab2e4a9b9ea9d6fe4dbb85153205e15f4a080f30 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-06-20T04:11:41 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 9 +++++++++ UI/Contacts/UIxContactEditor.m | 11 +++++++++++ UI/SOGoUI/UIxComponent.h | 3 +++ 3 files changed, 23 insertions(+) diff --git a/ChangeLog b/ChangeLog index 1cc14f34e..f92dd3cca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-06-20 Wolfgang Sourdeau + + * UI/Contacts/UIxContactEditor.m ([UIxContactEditor + -canCreateOrModify]): new overriden method that checks whether the + current clientObject is an instance of SOGoContactLDIFEntry before + returning the super method. This is to avoid the case where the + "save" button would appear because the user is listed as a super + user, which owns everything. + 2008-06-19 Wolfgang Sourdeau * UI/MainUI/SOGoUserHomePage.m ([SOGoUserHomePage diff --git a/UI/Contacts/UIxContactEditor.m b/UI/Contacts/UIxContactEditor.m index af0317af6..caabbd967 100644 --- a/UI/Contacts/UIxContactEditor.m +++ b/UI/Contacts/UIxContactEditor.m @@ -391,6 +391,16 @@ return @"editAsContact"; } +- (BOOL) canCreateOrModify +{ + SOGoObject *co; + + co = [self clientObject]; + + return ([co isKindOfClass: [SOGoContentObject class]] + && [super canCreateOrModify]); +} + - (CardElement *) _elementWithTag: (NSString *) tag ofType: (NSString *) type { @@ -589,3 +599,4 @@ } @end /* UIxContactEditor */ + diff --git a/UI/SOGoUI/UIxComponent.h b/UI/SOGoUI/UIxComponent.h index 5897f3aa7..e70d4af0b 100644 --- a/UI/SOGoUI/UIxComponent.h +++ b/UI/SOGoUI/UIxComponent.h @@ -87,6 +87,9 @@ /* HTTP method safety */ - (BOOL) isInvokedBySafeMethod; + +/* display the "save" button */ +- (BOOL) canCreateOrModify; /* locale */ - (NSDictionary *)locale;