  
  	/**********************************************************************************************************************************************************************************************************************************************************
  	 * Configuration
-@@ -557,4 +560,14 @@
+@@ -557,4 +560,18 @@
  		
  		return;
  	}
 +	
 +	public String[] getUserDelegatedAccessRealmRole(String siteRef){
 +		//returns an array of {realm, role} as well as sets the users session denied tools map
-+		String[] access = delegatedAccessProjectLogic().getCurrentUsersAccessToSite(siteRef);
-+		if(access != null && access.length == 2){
-+			return access;
-+		}else{
++		try{
++			String[] access = delegatedAccessProjectLogic().getCurrentUsersAccessToSite(siteRef);
++			if(access != null && access.length == 2){
++				return access;
++			}else{
++				return null;
++			}
++		}catch(Exception e){
 +			return null;
 +		}
 +	}
  }
-Index: kernel-impl/src/main/java/org/sakaiproject/authz/impl/SakaiSecurityTest.java
-===================================================================
---- kernel-impl/src/main/java/org/sakaiproject/authz/impl/SakaiSecurityTest.java	(revision 106066)
-+++ kernel-impl/src/main/java/org/sakaiproject/authz/impl/SakaiSecurityTest.java	(working copy)
-@@ -22,6 +22,7 @@
- package org.sakaiproject.authz.impl;
- 
- import org.sakaiproject.authz.api.AuthzGroupService;
-+import org.sakaiproject.delegatedaccess.logic.ProjectLogic;
- import org.sakaiproject.entity.api.EntityManager;
- import org.sakaiproject.event.api.EventTrackingService;
- import org.sakaiproject.memory.api.MemoryService;
-@@ -91,4 +92,11 @@
- 	{
- 		return null;
- 	}
-+
-+	/**
-+	 * @return the ProjectLogic for delegated access
-+	 */
-+	protected ProjectLogic delegatedAccessProjectLogic() {
-+		return null;
-+	}
- }
 Index: kernel-impl/pom.xml
 ===================================================================
---- kernel-impl/pom.xml	(revision 106066)
+--- kernel-impl/pom.xml	(revision 106071)
 +++ kernel-impl/pom.xml	(working copy)
 @@ -45,6 +45,11 @@
    </build>

 }
Index: kernel-impl/src/main/java/org/sakaiproject/authz/impl/DbAuthzGroupService.java
===================================================================
--- kernel-impl/src/main/java/org/sakaiproject/authz/impl/DbAuthzGroupService.java	(revision 106066)
+++ kernel-impl/src/main/java/org/sakaiproject/authz/impl/DbAuthzGroupService.java	(working copy)
@@ -1636,11 +1636,18 @@
 			// Would be better to get this initially to make the code more efficient, but the realms collection

       <version>${project.version}</version>
Index: kernel-component/src/main/webapp/WEB-INF/authz-components.xml
===================================================================
--- kernel-component/src/main/webapp/WEB-INF/authz-components.xml	(revision 106071)
+++ kernel-component/src/main/webapp/WEB-INF/authz-components.xml	(working copy)
@@ -51,6 +51,7 @@
  		<lookup-method name="entityManager" bean="org.sakaiproject.entity.api.EntityManager" />
