diff -r 823ab147085b -r 5c8040f30367 site-manage/site-manage-tool/tool/src/java/org/sakaiproject/site/tool/SiteAction.java
--- a/site-manage/site-manage-tool/tool/src/java/org/sakaiproject/site/tool/SiteAction.java	Wed Apr 23 14:41:54 2008 +1000
+++ b/site-manage/site-manage-tool/tool/src/java/org/sakaiproject/site/tool/SiteAction.java	Mon Aug 18 13:11:47 2008 +1000
@@ -2117,9 +2117,15 @@ public class SiteAction extends PagedRes
 					context.put("disableJoinable", Boolean.TRUE);
 				}
 
+				// the template site, if using one
+				Site templateSite = (Site) state.getAttribute(STATE_TEMPLATE_SITE);
+				
 				// use the type's template, if defined
 				String realmTemplate = "!site.template";
-				if (siteInfo.site_type != null) {
+				// if create based on template, use the roles from the template
+				if (templateSite != null) {
+					realmTemplate = "/site/" + templateSite.getId();
+				} else if (siteInfo.site_type != null) {
 					realmTemplate = realmTemplate + "." + siteInfo.site_type;
 				}
 				try {
@@ -2138,7 +2144,6 @@ public class SiteAction extends PagedRes
 				// new site, go to confirmation page
 				context.put("continue", "10");
 				
-				Site templateSite = (Site) state.getAttribute(STATE_TEMPLATE_SITE);
 
 				// if create based on template, back to 2
 				if (templateSite != null) {
