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;