]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
NOJIRA - fixed case problem with roles table name in createDefaultAccounts. This...
authorPatrick Schmitz <pschmitz@berkeley.edu>
Fri, 19 Nov 2010 19:04:20 +0000 (19:04 +0000)
committerPatrick Schmitz <pschmitz@berkeley.edu>
Fri, 19 Nov 2010 19:04:20 +0000 (19:04 +0000)
services/common/src/main/java/org/collectionspace/services/common/ServiceMain.java

index b294704372ccd560461aceb2ce06ebfa4843a09c..43af76e7499784545f54e4bb8798cc7e88a20801 100644 (file)
@@ -338,7 +338,7 @@ public class ServiceMain {
                // Fifth, fetch and save the default roles\r
                        String springAdminRoleCSID = null;\r
                String querySpringRole = \r
-                       "SELECT `csid` from `Roles` WHERE `rolename`='"+SPRING_ADMIN_ROLE+"'";\r
+                       "SELECT `csid` from `roles` WHERE `rolename`='"+SPRING_ADMIN_ROLE+"'";\r
                        rs = stmt.executeQuery(querySpringRole);\r
                if(rs.next()) {\r
                        springAdminRoleCSID = rs.getString(1);\r
@@ -348,7 +348,7 @@ public class ServiceMain {
                }\r
                } else {\r
                 String insertSpringAdminRoleSQL =\r
-                       "INSERT INTO `Roles` (`csid`, `rolename`, `displayName`, `rolegroup`, `created_at`, `tenant_id`) "\r
+                       "INSERT INTO `roles` (`csid`, `rolename`, `displayName`, `rolegroup`, `created_at`, `tenant_id`) "\r
                        + "VALUES ('-1', 'ROLE_SPRING_ADMIN', 'SPRING_ADMIN', 'Spring Security Administrator', now(), '0')";\r
                        stmt.executeUpdate(insertSpringAdminRoleSQL);\r
                        springAdminRoleCSID = "-1";\r
@@ -359,7 +359,7 @@ public class ServiceMain {
                }\r
                rs.close();\r
                String getRoleCSIDSql =\r
-                       "SELECT `csid` from `Roles` WHERE `tenant_id`=? and `rolename`=?";\r
+                       "SELECT `csid` from `roles` WHERE `tenant_id`=? and `rolename`=?";\r
                pstmt = conn.prepareStatement(getRoleCSIDSql); // create a statement\r
                rs = null;\r
             Hashtable<String, String> tenantAdminRoleCSIDs = new Hashtable<String, String>();\r
@@ -371,7 +371,7 @@ public class ServiceMain {
                        // extract data from the ResultSet\r
                        if(!rs.next()) {\r
                                throw new RuntimeException("Cannot find role: "+getDefaultAdminRole(tId)\r
-                                               +" for tenant id: "+tId+" in Roles!");\r
+                                               +" for tenant id: "+tId+" in roles!");\r
                        }\r
                        String tenantAdminRoleCSID = rs.getString(1);\r
                if (logger.isDebugEnabled()) {\r
@@ -387,7 +387,7 @@ public class ServiceMain {
                        // extract data from the ResultSet\r
                        if(!rs.next()) {\r
                                throw new RuntimeException("Cannot find role: "+getDefaultReaderRole(tId)\r
-                                               +" for tenant id: "+tId+" in Roles!");\r
+                                               +" for tenant id: "+tId+" in roles!");\r
                        }\r
                        String tenantReaderRoleCSID = rs.getString(1);\r
                if (logger.isDebugEnabled()) {\r