+2005-07-08 Marcus Mueller <znek@mulle-kybernetik.com>
+
+ * UIxComponent.m: moved -isAccessRestricted method to
+ UIxComponent+Agenor (v0.9.28)
+
2005-07-07 Marcus Mueller <znek@mulle-kybernetik.com>
* v0.9.27
return [[self context] valueForKey:@"locale"];
}
-/* Access is in several ways restricted if request is not coming from the
- * Intranet
- */
-
-- (BOOL)isAccessRestricted {
- NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
-
- return [ud boolForKey:@"SOGoAccessIsRestricted"];
-}
-
/* debugging */
- (BOOL)isUIxDebugEnabled {
# version file
-SUBMINOR_VERSION:=27
+SUBMINOR_VERSION:=28
# v0.9.18 requires NGExtensions v4.5.136
+2005-07-08 Marcus Mueller <znek@mulle-kybernetik.com>
+
+ * v0.9.126
+
+ * UIxComponent+Agenor.[hm]: new method -isAccessRestricted, uses the
+ implementation from WOContext+Agenor in libSOGo.
+
+ * UIxAppointmentView.m: allow editing of appointments that have no
+ organizer set.
+
+ * UIxAppointmentEditor.m: allow editing of appointments that have no
+ organizer set. Redirect to 'view' URI in case editor is not the
+ organizer. Fixed a bug where the organizer got accidentaly deleted.
+
2005-07-07 Marcus Mueller <znek@mulle-kybernetik.com>
* v0.9.125
[_appointment setAccessClass:[self accessClass]];
[_appointment setTransparency:[self transparency]];
+#if 0
+ /* bad, bad, bad!
+ * Organizer is no form value, thus we MUST NOT change it
+ */
[_appointment setOrganizer:self->organizer];
+#endif
attendees = [self participants];
lResources = [self resources];
if ([lResources count] > 0) {
/* access */
- (BOOL)isMyApt {
+ if (!self->organizer) return YES; // assume this is safe to do, right?
return [[self->organizer rfc822Email] isEqualToString:[self emailForUser]];
}
[self setContentString:ical];
[self loadValuesFromContentString:ical];
+ if (![self canEditApt]) {
+ /* TODO: we need proper ACLs */
+ return [self redirectToLocation:[self _completeURIForMethod:@"../view"]];
+ }
return self;
}
iCalPerson *organizer;
organizer = [[self appointment] organizer];
+ if (!organizer) return YES; // assume this is correct to do, right?
return [[organizer rfc822Email] isEqualToString:[self emailForUser]];
}
#ifndef __UIxComponent_Agenor_H_
#define __UIxComponent_Agenor_H_
-
-#import <SOGoUI/UIxComponent.h>
-
+#include <SOGoUI/UIxComponent.h>
@interface UIxComponent (Agenor)
/* email, cn */
- (NSString *)emailForUser;
- (NSString *)cnForUser;
+
+/* restrictions */
+- (BOOL)isAccessRestricted;
@end
#endif /* __UIxComponent_Agenor_H_ */
#include "UIxComponent+Agenor.h"
#include <SOGo/AgenorUserManager.h>
+#include <SOGo/WOContext+Agenor.h>
#include "common.h"
@implementation UIxComponent(Agenor)
return [[AgenorUserManager sharedUserManager] getCNForUID:uid];
}
+- (BOOL)isAccessRestricted {
+ return [[self context] isAccessFromIntranet] ? NO : YES;
+}
+
@end /* UIxComponent(Agenor) */
# Version file
-SUBMINOR_VERSION:=125
+SUBMINOR_VERSION:=126
# v0.9.123 requires Appointments v0.9.35
# v0.9.123 requires SOGoUI v0.9.24
+2005-07-08 Marcus Mueller <znek@mulle-kybernetik.com>
+
+ * UIxAppointmentEditor.wox: removed conditionals from UI as they were
+ wrongly placed in the template, component does now deal with it
+
2005-07-07 Marcus Mueller <znek@mulle-kybernetik.com>
* UIxPageFrame.wox: added 'Home' and 'Administration' hyperlink
className="UIxPageFrame"
title="name"
>
- <var:if condition="canEditApt"> <!-- workaround -->
- <form var:href="clientObject.baseURL">
+ <form var:href="clientObject.baseURL">
<script language="JavaScript"> <!-- TODO: use a resource -->
<var:string value="jsCode" const:escapeHTML="NO" />
</script>
</td>
</tr>
</table>
-
- <input type="hidden" name="ical" var:value="iCalString" />
- </form>
- </var:if>
-
+ <input type="hidden" name="ical" var:value="iCalString" />
+ </form>
+ <!--
<var:if condition="canEditApt" const:negate="YES">
Forbidden ... <var:redirect const:setURL="view" />
</var:if>
+ -->
</var:component>