From 8a55da304ff342becda4e508ff5838d407b525e0 Mon Sep 17 00:00:00 2001 From: helge Date: Mon, 1 Aug 2005 12:54:00 +0000 Subject: [PATCH] moved class security declarations from MainUI/product.plist to their classes git-svn-id: http://svn.opengroupware.org/SOGo/trunk@930 d1b88da0-ebda-0310-925b-ed51d893ca5b --- Main/ChangeLog | 4 ++++ Main/SOGo.m | 23 +++++++++++++++++++++++ Main/Version | 2 +- SoObjects/SOGo/ChangeLog | 5 +++++ SoObjects/SOGo/SOGoObject.m | 16 ++++++++++++++++ SoObjects/SOGo/Version | 2 +- UI/MainUI/ChangeLog | 5 +++++ UI/MainUI/Version | 2 +- UI/MainUI/product.plist | 26 +++----------------------- 9 files changed, 59 insertions(+), 26 deletions(-) diff --git a/Main/ChangeLog b/Main/ChangeLog index 1f7fa7b6..601b5825 100644 --- a/Main/ChangeLog +++ b/Main/ChangeLog @@ -1,5 +1,9 @@ 2005-08-01 Helge Hess + * SOGo.m: added class security declarations (previously in + product.plist of MainUI), ensure that core SOGo SoClasses are loaded + (v0.9.40) + * v0.9.39 * moved MainUI product bundle to UI/MainUI diff --git a/Main/SOGo.m b/Main/SOGo.m index 3d78f6ab..4274d838 100644 --- a/Main/SOGo.m +++ b/Main/SOGo.m @@ -62,15 +62,38 @@ static BOOL doCrashOnSessionCreate = NO; if ([ud boolForKey:@"SOGoEnableDoubleReleaseCheck"]) [NSAutoreleasePool enableDoubleReleaseCheck:YES]; #endif + + /* SoClass security declarations */ + + /* require View permission to access the root (bound to authenticated ...) */ + [[self soClassSecurityInfo] declareObjectProtected:SoPerm_View]; + + /* to allow public access to all contained objects (subkeys) */ + [[self soClassSecurityInfo] setDefaultAccess:@"allow"]; + + /* require Authenticated role for View and WebDAV */ + [[self soClassSecurityInfo] declareRole:SoRole_Authenticated + asDefaultForPermission:SoPerm_View]; + [[self soClassSecurityInfo] declareRole:SoRole_Authenticated + asDefaultForPermission:SoPerm_WebDAVAccess]; } - (id)init { if ((self = [super init])) { WOResourceManager *rm; + /* ensure core SoClass'es are setup */ + [NSClassFromString(@"SOGoObject") soClass]; + [NSClassFromString(@"SOGoContentObject") soClass]; + [NSClassFromString(@"SOGoFolder") soClass]; + + /* setup locale cache */ self->localeLUT = [[NSMutableDictionary alloc] initWithCapacity:2]; + + /* load products */ [[SOGoProductLoader productLoader] loadProducts]; + /* setup resource manager */ rm = [[WEResourceManager alloc] init]; [self setResourceManager:rm]; } diff --git a/Main/Version b/Main/Version index 95f9a975..7e0fcfa6 100644 --- a/Main/Version +++ b/Main/Version @@ -1,6 +1,6 @@ # Version file -SUBMINOR_VERSION:=39 +SUBMINOR_VERSION:=40 # v0.9.32 requires libSOGo v0.9.57 # v0.9.24 requires libWEExtensions v4.5.67 diff --git a/SoObjects/SOGo/ChangeLog b/SoObjects/SOGo/ChangeLog index ba069600..04a4b2e1 100644 --- a/SoObjects/SOGo/ChangeLog +++ b/SoObjects/SOGo/ChangeLog @@ -1,3 +1,8 @@ +2005-08-01 Helge Hess + + * SOGoObject.m: added class security declarations (previously in + product.plist of MainUI) (v0.9.69) + 2005-07-21 Helge Hess * SOGoUser.m: added a method to fetch share/emitter address pairs from diff --git a/SoObjects/SOGo/SOGoObject.m b/SoObjects/SOGo/SOGoObject.m index ac1e4fe1..9863d36f 100644 --- a/SoObjects/SOGo/SOGoObject.m +++ b/SoObjects/SOGo/SOGoObject.m @@ -42,8 +42,24 @@ static BOOL kontactGroupDAV = YES; kontactGroupDAV = [ud boolForKey:@"SOGoDisableKontact34GroupDAVHack"] ? NO : YES; + + /* SoClass security declarations */ + + /* require View permission to access the root (bound to authenticated ...) */ + [[self soClassSecurityInfo] declareObjectProtected:SoPerm_View]; + + /* to allow public access to all contained objects (subkeys) */ + [[self soClassSecurityInfo] setDefaultAccess:@"allow"]; + + /* require Authenticated role for View and WebDAV */ + [[self soClassSecurityInfo] declareRole:SoRole_Authenticated + asDefaultForPermission:SoPerm_View]; + [[self soClassSecurityInfo] declareRole:SoRole_Authenticated + asDefaultForPermission:SoPerm_WebDAVAccess]; } +/* containment */ + - (BOOL)doesRetainContainer { return YES; } diff --git a/SoObjects/SOGo/Version b/SoObjects/SOGo/Version index 7a496da8..67415967 100644 --- a/SoObjects/SOGo/Version +++ b/SoObjects/SOGo/Version @@ -1,6 +1,6 @@ # version file -SUBMINOR_VERSION:=68 +SUBMINOR_VERSION:=69 # v0.9.63 requires libNGiCal v4.5.54 # v0.9.60 requires libNGiCal v4.5.49 diff --git a/UI/MainUI/ChangeLog b/UI/MainUI/ChangeLog index 4eb70344..16cf5ae8 100644 --- a/UI/MainUI/ChangeLog +++ b/UI/MainUI/ChangeLog @@ -1,4 +1,9 @@ 2005-08-01 Helge Hess + * product.plist: moved security declarations of core classes to the + +initialize method of the classes, + add SOGo application object methods in a category (was a class) + (v0.9.2) + * created UI/MainUI product bundle from sources in Main (v0.9.1) diff --git a/UI/MainUI/Version b/UI/MainUI/Version index 5768c75d..73946baa 100644 --- a/UI/MainUI/Version +++ b/UI/MainUI/Version @@ -1,5 +1,5 @@ # Version file -SUBMINOR_VERSION:=1 +SUBMINOR_VERSION:=2 # v0.9.1 requires Main v0.9.59 diff --git a/UI/MainUI/product.plist b/UI/MainUI/product.plist index 6defc0eb..19da3a97 100644 --- a/UI/MainUI/product.plist +++ b/UI/MainUI/product.plist @@ -4,15 +4,8 @@ publicResources = ( ); - classes = { + categories = { SOGo = { // TODO: move decls to class - superclass = "SoApplication"; - protectedBy = "View"; - defaultAccess = "allow"; - defaultRoles = { - "View" = "Authenticated"; - "WebDAV Access" = "Authenticated"; - }; methods = { index = { protectedBy = "View"; @@ -29,7 +22,9 @@ }; }; }; + }; + classes = { SOGoRootPage = { superclass = "SoComponent"; protectedBy = "View"; @@ -38,21 +33,6 @@ }; }; - SOGoObject = { // TODO: move decls to class - protectedBy = "View"; - defaultAccess = "allow"; - defaultRoles = { - "View" = "Authenticated"; - "WebDAV Access" = "Authenticated"; - }; - }; - SOGoContentObject = { - superclass = "SOGoObject"; - }; - SOGoFolder = { // TODO: move decls to class - superclass = "SOGoObject"; - }; - SOGoUserFolder = { superclass = "SOGoFolder"; -- 2.39.5