[Yanel-commits] rev 33453 -
public/yanel/contributions/ajax-components/src/access-policy-editor/java/org/wyona/security/gwt/accesspolicyeditor/client
michi at wyona.com
michi at wyona.com
Sun Mar 16 16:17:34 CET 2008
Author: michi
Date: 2008-03-16 16:17:33 +0100 (Sun, 16 Mar 2008)
New Revision: 33453
Modified:
public/yanel/contributions/ajax-components/src/access-policy-editor/java/org/wyona/security/gwt/accesspolicyeditor/client/PolicyListBoxWidget.java
Log:
validation check added
Modified: public/yanel/contributions/ajax-components/src/access-policy-editor/java/org/wyona/security/gwt/accesspolicyeditor/client/PolicyListBoxWidget.java
===================================================================
--- public/yanel/contributions/ajax-components/src/access-policy-editor/java/org/wyona/security/gwt/accesspolicyeditor/client/PolicyListBoxWidget.java 2008-03-16 15:10:18 UTC (rev 33452)
+++ public/yanel/contributions/ajax-components/src/access-policy-editor/java/org/wyona/security/gwt/accesspolicyeditor/client/PolicyListBoxWidget.java 2008-03-16 15:17:33 UTC (rev 33453)
@@ -172,10 +172,14 @@
if (identity.indexOf("(") > 0) {
String[] rightsString = identity.substring(identity.indexOf("(") + 1, identity.indexOf(")")).split(",");
+ if (rightsString.length != availableRights.length) {
+ Window.alert("Exception: Validation of rights length failed!");
+ return null;
+ }
Right[] rights = new Right[availableRights.length];
for (int i = 0; i < rightsString.length; i++) {
if (rightsString[i].equals("-")) {
- rights[i] = new Right(rightsString[i], false);
+ rights[i] = new Right(availableRights[i].getId(), false);
} else {
rights[i] = new Right(rightsString[i], true);
}
More information about the Yanel-commits
mailing list