You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by th...@apache.org on 2006/09/05 12:45:15 UTC
svn commit: r440316 -
/lenya/trunk/src/modules-core/ac-impl/java/test/org/apache/lenya/ac/impl/PolicyTest.java
Author: thorsten
Date: Tue Sep 5 03:45:13 2006
New Revision: 440316
URL: http://svn.apache.org/viewvc?view=rev&rev=440316
Log:
Fixing the savePolicy test which did not added any role to the default implementation which was wrong.
Modified:
lenya/trunk/src/modules-core/ac-impl/java/test/org/apache/lenya/ac/impl/PolicyTest.java
Modified: lenya/trunk/src/modules-core/ac-impl/java/test/org/apache/lenya/ac/impl/PolicyTest.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules-core/ac-impl/java/test/org/apache/lenya/ac/impl/PolicyTest.java?view=diff&rev=440316&r1=440315&r2=440316
==============================================================================
--- lenya/trunk/src/modules-core/ac-impl/java/test/org/apache/lenya/ac/impl/PolicyTest.java (original)
+++ lenya/trunk/src/modules-core/ac-impl/java/test/org/apache/lenya/ac/impl/PolicyTest.java Tue Sep 5 03:45:13 2006
@@ -84,7 +84,7 @@
for (int i = 0; i < credentials.length; i++) {
CredentialImpl credential = new CredentialImpl(credentials[i].getAccreditable());
Role[] roles = credentials[i].getRoles();
-
+ credential.setMethod(credentials[i].getMethod());
for (int j = 0; j < roles.length; j++) {
credential.addRole(roles[j]);
}
@@ -103,8 +103,12 @@
Credential[] newCredentials = newPolicy.getCredentials();
for (int i = 0; i < credentials.length; i++) {
- Credential credential = new CredentialImpl(credentials[i].getAccreditable());
-
+ CredentialImpl credential = new CredentialImpl(credentials[i].getAccreditable());
+Role[] roles = credentials[i].getRoles();
+for (int j = 0; j < roles.length; j++) {
+ credential.addRole(roles[j]);
+}
+credential.setMethod(credential.getMethod());
Credential newCredential = null;
for (int k = 0; k < newCredentials.length; k++) {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org