2007-11-09 Wolfgang Sourdeau <wsourdeau@inverse.ca>
+ * 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
protectedBy = "<public>";
pageName = "UIxContactView";
};
-/* delete = {
- protectedBy = "View";
- pageName = "UIxContactView";
- actionName = "delete";
- }; */
edit = {
- protectedBy = "Access Contents Information";
- pageName = "UIxContactEditor";
- };
-/* save = {
- protectedBy = "View";
+ protectedBy = "<public>";
pageName = "UIxContactEditor";
- actionName = "save";
};
- write = {
- protectedBy = "View";
- pageName = "UIxContactEditor";
- actionName = "write";
- }; */
};
};
};
#import <NGExtensions/NSString+misc.h>
#import <NGExtensions/NSURL+misc.h>
+#import <SoObjects/SOGo/NSCalendarDate+SOGo.h>
+#import <SoObjects/SOGo/NSString+Utilities.h>
#import <SoObjects/SOGo/SOGoUser.h>
#import <SoObjects/SOGo/SOGoObject.h>
+#import <SoObjects/SOGo/SOGoContentObject.h>
#import <SoObjects/SOGo/SOGoCustomGroupFolder.h>
-#import <SoObjects/SOGo/NSCalendarDate+SOGo.h>
-#import <SoObjects/SOGo/NSString+Utilities.h>
+#import <SoObjects/SOGo/SOGoPermissions.h>
#import "UIxJSClose.h"
return jsClose;
}
+/* common conditions */
+- (BOOL) canCreateOrModify
+{
+ SoSecurityManager *sm;
+
+ sm = [SoSecurityManager sharedSecurityManager];
+
+ return (![sm validatePermission: SoPerm_ChangeImagesAndFiles
+ onObject: [self clientObject]
+ inContext: context]);
+}
+
/* SoUser */
- (NSString *) shortUserNameForDisplay