#import <Foundation/NSUserDefaults.h>
#import <Foundation/NSKeyValueCoding.h>
#import <Foundation/NSPathUtilities.h>
+
#import <NGObjWeb/SoHTTPAuthenticator.h>
#import <NGObjWeb/SoObjects.h>
#import <NGObjWeb/WOResourceManager.h>
#import <NGObjWeb/WORequest.h>
+#import <NGObjWeb/WOResponse.h>
#import <NGObjWeb/WOContext+SoObjects.h>
#import <NGExtensions/NSObject+Logs.h>
#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 "UIxComponent.h"
#import "UIxJSClose.h"
+#import "UIxComponent.h"
+
@interface UIxComponent (PrivateAPI)
- (void)_parseQueryString:(NSString *)_s;
- (NSMutableDictionary *)_queryParameters;
return jsClose;
}
+/* common conditions */
+- (BOOL) canCreateOrModify
+{
+ SoSecurityManager *sm;
+
+ sm = [SoSecurityManager sharedSecurityManager];
+
+ return (![sm validatePermission: SoPerm_ChangeImagesAndFiles
+ onObject: [self clientObject]
+ inContext: context]);
+}
+
/* SoUser */
- (NSString *) shortUserNameForDisplay
{
+ if ([context activeUser] == nil)
+ return @"wrongusernamepassword";
+
return [[context activeUser] login];
}
if ([lTable hasPrefix:@"$"])
lTable = [self valueForKeyPath:[lTable substringFromIndex:1]];
-#if 0
- if ([lVal hasPrefix:@"$"])
- lVal = [self valueForKeyPath:[lVal substringFromIndex:1]];
-
-#endif
-
/* lookup string */
return [rm stringForKey: lKey
inTableNamed: lTable