continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From car...@apache.org
Subject svn commit: r433830 - /maven/continuum/branches/continuum-acegi/continuum-security/continuum-security-acegi/src/main/java/org/apache/maven/continuum/security/acegi/acl/AclInitializer.java
Date Wed, 23 Aug 2006 02:03:59 GMT
Author: carlos
Date: Tue Aug 22 19:03:58 2006
New Revision: 433830

URL: http://svn.apache.org/viewvc?rev=433830&view=rev
Log:
Make sure afterProperties set is always called. Fix name of admin role

Modified:
    maven/continuum/branches/continuum-acegi/continuum-security/continuum-security-acegi/src/main/java/org/apache/maven/continuum/security/acegi/acl/AclInitializer.java

Modified: maven/continuum/branches/continuum-acegi/continuum-security/continuum-security-acegi/src/main/java/org/apache/maven/continuum/security/acegi/acl/AclInitializer.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-security/continuum-security-acegi/src/main/java/org/apache/maven/continuum/security/acegi/acl/AclInitializer.java?rev=433830&r1=433829&r2=433830&view=diff
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-security/continuum-security-acegi/src/main/java/org/apache/maven/continuum/security/acegi/acl/AclInitializer.java
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-security/continuum-security-acegi/src/main/java/org/apache/maven/continuum/security/acegi/acl/AclInitializer.java
Tue Aug 22 19:03:58 2006
@@ -76,7 +76,7 @@
     /**
      * Classpath resource that contains the SQL to be executed.
      * 
-     * @return
+     * @return classpath path
      */
     public String getSqlClasspathResource()
     {
@@ -134,19 +134,19 @@
             throw new InitializationException( e.getMessage(), e );
         }
 
+        /* execute Spring initialization callback */
+        getDao().afterPropertiesSet();
+
         /* poor check to see if this is the first time initializing the database */
         if ( getSqlMojo().getSuccessfulStatements() >= 2 )
         {
             /* tables were created, insert default values */
             getLogger().info( "Initializing ACL database" );
 
-            /* execute Spring initialization callback */
-            getDao().afterPropertiesSet();
-
             /* admin can do anything with project number 1 */
             SimpleAclEntry aclEntry = new SimpleAclEntry();
             aclEntry.setAclObjectIdentity( new NamedEntityObjectIdentity( Project.class.getName(),
"1" ) );
-            aclEntry.setRecipient( "ROLE_ADMIN" );
+            aclEntry.setRecipient( "ROLE_admin" );
             aclEntry.addPermission( SimpleAclEntry.ADMINISTRATION );
             getDao().create( aclEntry );
         }



Mime
View raw message