View Issue Details

IDProjectCategoryView StatusLast Update
0002074SOGoWeb Calendarpublic2012-11-06 13:07
ReporterjrabyAssigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Versionnightly v2 
Target Version2.0.3Fixed in Version2.0.3 
Summary0002074: "show alarms" should be disabled when subcribing to a calendar
Description

By default, when subscribing to another user's calendar, SOGo web will show alarms related to that calendar.
While one can argue that it is sometimes useful, most user will turn that off as soon as they start getting alarms from the other user's events.
Furthermore, SOGo Integrator does the opposite: 'show alarms' is disabled by default.

This situation also exposes another bug / misfeature in scenarios similar to this:
A user is subscribed to a calendar via SOGo Web (show alarms = on)
He connects to sogo with TB/Lightning (and sogo integrator) using a new profile
The integrator will fetch the user's subscriptions and alarms options (show alarms on)
If the user doesn't have write access to the subscribed calendar he will get a 403 when trying to dismiss or snooze alarms generated from that calendar.

While the solution is simple, it can be pretty annoying...
So I suggest to simply disable the 'show alarms' option by default when subscribing to another user's calendar.

TagsNo tags attached.

Activities

Christian Mack

Christian Mack

2012-10-26 08:22

developer   ~0004710

This was discussed on the mailinglist several times.

Result was to disable reminder alarms for read only shared calendars.
This will prevent errors as "dismiss" or "snooze" can not work on them.

But to leave it to the user to disable alarms for the writable calendars.

wsourdeau

wsourdeau

2012-10-26 17:06

viewer   ~0004714

Those really are separate issues.

2012-11-04 14:53

 

2074.diff (2,163 bytes)   
diff --git a/SoObjects/SOGo/SOGoGCSFolder.m b/SoObjects/SOGo/SOGoGCSFolder.m
index 13a02ab..86fcf16 100644
--- a/SoObjects/SOGo/SOGoGCSFolder.m
+++ b/SoObjects/SOGo/SOGoGCSFolder.m
@@ -1,7 +1,7 @@
 /* SOGoGCSFolder.m - this file is part of SOGo
  *
  * Copyright (C) 2004-2005 SKYRIX Software AG
- * Copyright (C) 2006-2010 Inverse inc.
+ * Copyright (C) 2006-2012 Inverse inc.
  *
  * Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
  *
@@ -835,7 +835,7 @@ static NSArray *childRecordFields = nil;
 - (BOOL) subscribeUserOrGroup: (NSString *) theIdentifier
 		     reallyDo: (BOOL) reallyDo
 {
-  NSMutableDictionary *moduleSettings;
+  NSMutableDictionary *moduleSettings, *folderShowAlarms;
   NSMutableArray *folderSubscription;
   NSString *subscriptionPointer;
   NSMutableArray *allUsers;
@@ -886,6 +886,8 @@ static NSArray *childRecordFields = nil;
       folderSubscription
         = [moduleSettings objectForKey: @"SubscribedFolders"];
       subscriptionPointer = [self folderReference];
+      
+      folderShowAlarms = [moduleSettings objectForKey: @"FolderShowAlarms"];
 
       if (reallyDo)
         {
@@ -897,14 +899,26 @@ static NSArray *childRecordFields = nil;
                                  forKey: @"SubscribedFolders"];
             }
 
+	  if (!(folderShowAlarms
+                && [folderShowAlarms isKindOfClass: [NSMutableDictionary class]]))
+            {
+              folderShowAlarms = [NSMutableDictionary dictionary];
+              [moduleSettings setObject: folderShowAlarms
+                                 forKey: @"FolderShowAlarms"];
+            }
+
           [folderSubscription addObjectUniquely: subscriptionPointer];
+	  
+	  // By default, we disable alarms on subscribed calendars
+	  [folderShowAlarms setObject: [NSNumber numberWithBool: NO]
+			       forKey: subscriptionPointer];
         }
       else
         {
           [self removeFolderSettings: moduleSettings
                        withReference: subscriptionPointer];
           [folderSubscription removeObject: subscriptionPointer];
-        
+	  [folderShowAlarms removeObjectForKey: subscriptionPointer];
 	}
 
       [us synchronize];
2074.diff (2,163 bytes)   
ludovic

ludovic

2012-11-04 14:53

administrator   ~0004769

Jean, please try the attached patch. Thanks,

jraby

jraby

2012-11-05 21:02

viewer   ~0004775

Works as expected for me.

ludovic

ludovic

2012-11-06 13:07

administrator   ~0004777

Fixed: https://github.com/inverse-inc/sogo/commit/fe09a7969d5fe57468bd7540318da75111b767ab

Issue History

Date Modified Username Field Change
2012-10-25 19:29 jraby New Issue
2012-10-26 07:53 Christian Mack Relationship added related to 0000013
2012-10-26 07:54 Christian Mack Relationship added related to 0001941
2012-10-26 08:22 Christian Mack Note Added: 0004710
2012-10-26 17:05 wsourdeau Relationship deleted related to 0001941
2012-10-26 17:05 wsourdeau Relationship deleted related to 0000013
2012-10-26 17:06 wsourdeau Note Added: 0004714
2012-10-26 17:11 wsourdeau Target Version => 2.0.3
2012-11-04 14:53 ludovic File Added: 2074.diff
2012-11-04 14:53 ludovic Note Added: 0004769
2012-11-05 21:02 jraby Note Added: 0004775
2012-11-06 13:07 ludovic Note Added: 0004777
2012-11-06 13:07 ludovic Status new => closed
2012-11-06 13:07 ludovic Resolution open => fixed
2012-11-06 13:07 ludovic Fixed in Version => 2.0.3