From 24c6c8c91d421594bd51f07904d4cd3911cd187c Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Tue, 6 Jan 2015 10:59:56 -0500 Subject: [PATCH] Fix for bug #3054 --- NEWS | 1 + SoObjects/Appointments/SOGoAppointmentFolders.m | 2 +- SoObjects/SOGo/SOGoFolder.h | 2 +- SoObjects/SOGo/SOGoFolder.m | 2 +- SoObjects/SOGo/SOGoGCSFolder.h | 2 +- SoObjects/SOGo/SOGoObject.h | 7 ++++--- SoObjects/SOGo/SOGoObject.m | 2 +- SoObjects/SOGo/SOGoParentFolder.h | 2 +- SoObjects/SOGo/SOGoParentFolder.m | 10 +++++++--- 9 files changed, 18 insertions(+), 12 deletions(-) diff --git a/NEWS b/NEWS index 691b61f85..c4973a853 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,7 @@ Enhancements Bug fixes - fixed calendar selection in event and task editors (#3049, #3050) + - check for resources existence when listing subscribed ones (#3054) 2.2.13 (2014-12-30) ------------------- diff --git a/SoObjects/Appointments/SOGoAppointmentFolders.m b/SoObjects/Appointments/SOGoAppointmentFolders.m index 10361c006..2b8ee88c7 100644 --- a/SoObjects/Appointments/SOGoAppointmentFolders.m +++ b/SoObjects/Appointments/SOGoAppointmentFolders.m @@ -1,7 +1,7 @@ /* SOGoAppointmentFolders.m - this file is part of SOGo * - * Copyright (C) 2007-2014 Inverse inc. + * Copyright (C) 2007-2015 Inverse inc. * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/SoObjects/SOGo/SOGoFolder.h b/SoObjects/SOGo/SOGoFolder.h index 018cfe7e0..eb435a501 100644 --- a/SoObjects/SOGo/SOGoFolder.h +++ b/SoObjects/SOGo/SOGoFolder.h @@ -1,6 +1,6 @@ /* SOGoFolder.h - this file is part of SOGo * - * Copyright (C) 2007-2014 Inverse inc. + * Copyright (C) 2007-2015 Inverse inc. * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/SoObjects/SOGo/SOGoFolder.m b/SoObjects/SOGo/SOGoFolder.m index a390b9267..b089c258a 100644 --- a/SoObjects/SOGo/SOGoFolder.m +++ b/SoObjects/SOGo/SOGoFolder.m @@ -1,6 +1,6 @@ /* SOGoFolder.m - this file is part of SOGo * - * Copyright (C) 2007-2014 Inverse inc. + * Copyright (C) 2007-2015 Inverse inc. * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/SoObjects/SOGo/SOGoGCSFolder.h b/SoObjects/SOGo/SOGoGCSFolder.h index 806be9105..9b8de6b35 100644 --- a/SoObjects/SOGo/SOGoGCSFolder.h +++ b/SoObjects/SOGo/SOGoGCSFolder.h @@ -1,6 +1,6 @@ /* Copyright (C) 2004-2005 SKYRIX Software AG - Copyright (C) 2006-2014 Inverse inc. + Copyright (C) 2006-2015 Inverse inc. This file is part of SOGo. diff --git a/SoObjects/SOGo/SOGoObject.h b/SoObjects/SOGo/SOGoObject.h index 114b0c55d..e6de44944 100644 --- a/SoObjects/SOGo/SOGoObject.h +++ b/SoObjects/SOGo/SOGoObject.h @@ -1,14 +1,15 @@ /* Copyright (C) 2004-2005 SKYRIX Software AG + Copyright (C) 2006-2015 Inverse inc. - This file is part of OpenGroupware.org. + This file is part of SOGo. - OGo is free software; you can redistribute it and/or modify it under + SOGo is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - OGo is distributed in the hope that it will be useful, but WITHOUT ANY + SOGo is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. diff --git a/SoObjects/SOGo/SOGoObject.m b/SoObjects/SOGo/SOGoObject.m index 716e8f194..3f3afcb9b 100644 --- a/SoObjects/SOGo/SOGoObject.m +++ b/SoObjects/SOGo/SOGoObject.m @@ -1,7 +1,7 @@ /* SOGoObject.m - this file is part of SOGo * * Copyright (C) 2004-2005 SKYRIX Software AG - * Copyright (C) 2006-2013 Inverse inc. + * Copyright (C) 2006-2015 Inverse inc. * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/SoObjects/SOGo/SOGoParentFolder.h b/SoObjects/SOGo/SOGoParentFolder.h index 73ee5deeb..97cf89f8e 100644 --- a/SoObjects/SOGo/SOGoParentFolder.h +++ b/SoObjects/SOGo/SOGoParentFolder.h @@ -1,6 +1,6 @@ /* SOGoParentFolder.h - this file is part of SOGo * - * Copyright (C) 2006-2014 Inverse inc. + * Copyright (C) 2006-2015 Inverse inc. * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/SoObjects/SOGo/SOGoParentFolder.m b/SoObjects/SOGo/SOGoParentFolder.m index 164296b83..c0b44c5a4 100644 --- a/SoObjects/SOGo/SOGoParentFolder.m +++ b/SoObjects/SOGo/SOGoParentFolder.m @@ -1,8 +1,6 @@ /* SOGoParentFolder.m - this file is part of SOGo * - * Copyright (C) 2006-2009 Inverse inc. - * - * Author: Wolfgang Sourdeau + * Copyright (C) 2006-2015 Inverse inc. * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -294,7 +292,13 @@ static SoSecurityManager *sm = nil; subscribedFolder = [subFolderClass folderWithSubscriptionReference: sourceKey inContainer: self]; + + // We check with -ocsFolderForPath if the folder also exists in the database. + // This is important because user A could delete folder X, and user B has subscribed to it. + // If the "default roles" are enabled for calendars/address books, -validatePersmission:.. will + // work (grabbing the default role) and the deleted resource will be incorrectly returned. if (subscribedFolder + && [subscribedFolder ocsFolderForPath: [subscribedFolder ocsPath]] && ![sm validatePermission: SOGoPerm_AccessObject onObject: subscribedFolder inContext: context])