From 728328b8ede991a34df7170dfab054dee48cf6b2 Mon Sep 17 00:00:00 2001 From: Sebastien Ros Date: Mon, 17 May 2010 15:48:44 -0700 Subject: [PATCH] Updated Azure config files --HG-- branch : dev --- .../Config/Diagnostics.config | 8 +- .../Orchard.Azure.Web/Web.config | 312 ++++++++++-------- .../RolesBasedAuthorizationService.cs | 2 + 3 files changed, 189 insertions(+), 133 deletions(-) diff --git a/src/Orchard.Azure/Orchard.Azure.Web/Config/Diagnostics.config b/src/Orchard.Azure/Orchard.Azure.Web/Config/Diagnostics.config index 124536a7d..d603238d2 100644 --- a/src/Orchard.Azure/Orchard.Azure.Web/Config/Diagnostics.config +++ b/src/Orchard.Azure/Orchard.Azure.Web/Config/Diagnostics.config @@ -3,25 +3,25 @@ - + - + - + - + diff --git a/src/Orchard.Azure/Orchard.Azure.Web/Web.config b/src/Orchard.Azure/Orchard.Azure.Web/Web.config index b1de2f004..722cd267a 100644 --- a/src/Orchard.Azure/Orchard.Azure.Web/Web.config +++ b/src/Orchard.Azure/Orchard.Azure.Web/Web.config @@ -8,151 +8,205 @@ \Windows\Microsoft.Net\Framework\v2.x\Config --> - - - -
- -
-
-
-
- - - - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Roles/Services/RolesBasedAuthorizationService.cs b/src/Orchard.Web/Modules/Orchard.Roles/Services/RolesBasedAuthorizationService.cs index bc64d983d..d7a84b18d 100644 --- a/src/Orchard.Web/Modules/Orchard.Roles/Services/RolesBasedAuthorizationService.cs +++ b/src/Orchard.Web/Modules/Orchard.Roles/Services/RolesBasedAuthorizationService.cs @@ -65,6 +65,8 @@ namespace Orchard.Roles.Services { foreach (var role in rolesToExamine) { RoleRecord roleRecord = _roleService.GetRoleByName(role); + if ( roleRecord == null ) + continue; foreach (var permissionName in _roleService.GetPermissionsForRole(roleRecord.Id)) { string possessedName = permissionName; if (grantingNames.Any(grantingName => String.Equals(possessedName, grantingName, StringComparison.OrdinalIgnoreCase))) {