You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2007/12/13 12:00:50 UTC
svn commit: r603882 -
/lenya/trunk/src/modules-core/ac/java/src/org/apache/lenya/ac/impl/PolicyBuilder.java
Author: andreas
Date: Thu Dec 13 03:00:50 2007
New Revision: 603882
URL: http://svn.apache.org/viewvc?rev=603882&view=rev
Log:
Throw reasonable error message if non-existent roles are assigned in policies.
Modified:
lenya/trunk/src/modules-core/ac/java/src/org/apache/lenya/ac/impl/PolicyBuilder.java
Modified: lenya/trunk/src/modules-core/ac/java/src/org/apache/lenya/ac/impl/PolicyBuilder.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules-core/ac/java/src/org/apache/lenya/ac/impl/PolicyBuilder.java?rev=603882&r1=603881&r2=603882&view=diff
==============================================================================
--- lenya/trunk/src/modules-core/ac/java/src/org/apache/lenya/ac/impl/PolicyBuilder.java (original)
+++ lenya/trunk/src/modules-core/ac/java/src/org/apache/lenya/ac/impl/PolicyBuilder.java Thu Dec 13 03:00:50 2007
@@ -126,6 +126,9 @@
for (int j = 0; j < roleElements.length; j++) {
String roleId = roleElements[j].getAttribute(ID_ATTRIBUTE);
Role role = getAccreditableManager().getRoleManager().getRole(roleId);
+ if (role == null) {
+ throw new AccessControlException("The role '" + roleId + "'Êdoes not exist.");
+ }
CredentialImpl credential = new CredentialImpl(accreditable, role);
String method = roleElements[j].getAttribute(METHOD_ATTRIBUTE);
// If method is not set, we assume DENY
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org