diff --git a/ChangeLog b/ChangeLog index ac03ed80d..6ed072424 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2007-11-09 Wolfgang Sourdeau + * UI/SOGoUI/UIxComponent.m ([UIxComponent -canCreateOrModify]): + new boolean accessor that determines whether someone can create + (i.e. modify a new entry) or modify an existing entry. + * SoObjects/SOGo/SOGoObject.m ([SOGoObject -lookupName:lookupNameinContext:localContextacquire:acquire]): overriden method to bind looked up keys to So methods but by diff --git a/UI/Contacts/product.plist b/UI/Contacts/product.plist index 1168ddcf2..1b4d7eb3c 100644 --- a/UI/Contacts/product.plist +++ b/UI/Contacts/product.plist @@ -158,25 +158,10 @@ protectedBy = ""; pageName = "UIxContactView"; }; -/* delete = { - protectedBy = "View"; - pageName = "UIxContactView"; - actionName = "delete"; - }; */ edit = { - protectedBy = "Access Contents Information"; + protectedBy = ""; pageName = "UIxContactEditor"; }; -/* save = { - protectedBy = "View"; - pageName = "UIxContactEditor"; - actionName = "save"; - }; - write = { - protectedBy = "View"; - pageName = "UIxContactEditor"; - actionName = "write"; - }; */ }; }; }; diff --git a/UI/SOGoUI/UIxComponent.m b/UI/SOGoUI/UIxComponent.m index efbe22c91..a376ba607 100644 --- a/UI/SOGoUI/UIxComponent.m +++ b/UI/SOGoUI/UIxComponent.m @@ -35,11 +35,13 @@ #import #import -#import -#import -#import #import #import +#import +#import +#import +#import +#import #import "UIxJSClose.h" @@ -423,6 +425,18 @@ static BOOL uixDebugEnabled = NO; return jsClose; } +/* common conditions */ +- (BOOL) canCreateOrModify +{ + SoSecurityManager *sm; + + sm = [SoSecurityManager sharedSecurityManager]; + + return (![sm validatePermission: SoPerm_ChangeImagesAndFiles + onObject: [self clientObject] + inContext: context]); +} + /* SoUser */ - (NSString *) shortUserNameForDisplay diff --git a/UI/Templates/ContactsUI/UIxContactEditor.wox b/UI/Templates/ContactsUI/UIxContactEditor.wox index af3e3b025..fa69e46dd 100644 --- a/UI/Templates/ContactsUI/UIxContactEditor.wox +++ b/UI/Templates/ContactsUI/UIxContactEditor.wox @@ -335,11 +335,12 @@
- +