From f9d2acded7d1ee0861ec356eb3075322546ac185 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Thu, 7 Apr 2016 20:00:30 -0400 Subject: [PATCH] (fix) Calendars list in component editor --- NEWS | 2 ++ UI/Scheduler/UIxComponentEditor.m | 10 ++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index e8efe1a30..ab6f147c4 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,8 @@ Bug fixes - properly escape organizer name when using EAS (#3615) - properly escape wide characters (#3616) + - calendars list when creating a new component in a calendar in which the user + can't delete components 2.3.10 (2016-04-05) ------------------- diff --git a/UI/Scheduler/UIxComponentEditor.m b/UI/Scheduler/UIxComponentEditor.m index 531daa076..2bea31ca7 100644 --- a/UI/Scheduler/UIxComponentEditor.m +++ b/UI/Scheduler/UIxComponentEditor.m @@ -1247,12 +1247,14 @@ iRANGE(2); sm = [SoSecurityManager sharedSecurityManager]; perm = SoPerm_DeleteObjects; - if ([sm validatePermission: perm - onObject: calendar - inContext: context]) - { + if (![[self clientObject] isNew] && + [sm validatePermission: perm + onObject: calendar + inContext: context]) + { // User can't delete components from this calendar; // don't add any calendar other than the current one + // unless it's a new component [calendarList addObject: calendar]; } else