From e0f8bcdf7743cf18e1bdb0438201f0d1498f8ac9 Mon Sep 17 00:00:00 2001 From: helge Date: Wed, 22 Nov 2006 23:16:35 +0000 Subject: [PATCH] enable the use of arrays in the declaration of default roles for a permission in product.plist files git-svn-id: http://svn.opengroupware.org/SOPE/trunk@1382 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- sope-appserver/NGObjWeb/ChangeLog | 6 ++++++ .../NGObjWeb/SoObjects/SoProductClassInfo.m | 11 +++++++++-- sope-appserver/NGObjWeb/Version | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/sope-appserver/NGObjWeb/ChangeLog b/sope-appserver/NGObjWeb/ChangeLog index d833dda3..b43e9fa0 100644 --- a/sope-appserver/NGObjWeb/ChangeLog +++ b/sope-appserver/NGObjWeb/ChangeLog @@ -1,3 +1,9 @@ +2006-11-23 Wolfgang Sourdeau + + * SoObjects/SoProductClassInfo.m: enable the use of arrays in the + declaration of default roles for a permission in product.plist files + (v4.5.257) + 2006-11-14 Helge Hess * WEClientCapabilities.m: added Sunbird as a known user-agent diff --git a/sope-appserver/NGObjWeb/SoObjects/SoProductClassInfo.m b/sope-appserver/NGObjWeb/SoObjects/SoProductClassInfo.m index 17c95ea6..f21a407d 100644 --- a/sope-appserver/NGObjWeb/SoObjects/SoProductClassInfo.m +++ b/sope-appserver/NGObjWeb/SoObjects/SoProductClassInfo.m @@ -119,9 +119,16 @@ static int loadDebugOn = 0; perms = [self->roleInfo keyEnumerator]; while ((perm = [perms nextObject]) != nil) { - NSString *role = [self->roleInfo objectForKey:perm]; + id role = [self->roleInfo objectForKey:perm]; - [_security declareRole:role asDefaultForPermission:perm]; + if ([role isKindOfClass:[NSArray class]]) + [_security declareRoles:role asDefaultForPermission:perm]; + else if ([role isKindOfClass:[NSString class]]) + [_security declareRole:role asDefaultForPermission:perm]; + else { + [self warnWithFormat: + @"unexpected 'role' value (expect string or array): %@", role]; + } } } } diff --git a/sope-appserver/NGObjWeb/Version b/sope-appserver/NGObjWeb/Version index 8d291ac6..4d722dcb 100644 --- a/sope-appserver/NGObjWeb/Version +++ b/sope-appserver/NGObjWeb/Version @@ -3,7 +3,7 @@ ifeq ($(GNUSTEP_HOST_VENDOR),apple) # linker overflow SUBMINOR_VERSION:=255 else -SUBMINOR_VERSION:=256 +SUBMINOR_VERSION:=257 endif # v4.5.234 requires libDOM v4.5.21 -- 2.39.5