[Yanel-commits] rev 33204 -
public/yanel/contributions/ajax-components/src/access-policy-editor/java/org/wyona/security/gwt/accesspolicyeditor/client
michi at wyona.com
michi at wyona.com
Tue Mar 11 01:14:53 CET 2008
Author: michi
Date: 2008-03-11 01:14:53 +0100 (Tue, 11 Mar 2008)
New Revision: 33204
Modified:
public/yanel/contributions/ajax-components/src/access-policy-editor/java/org/wyona/security/gwt/accesspolicyeditor/client/PolicyListBoxWidget.java
Log:
set rights fixed
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-11 00:14:27 UTC (rev 33203)
+++ public/yanel/contributions/ajax-components/src/access-policy-editor/java/org/wyona/security/gwt/accesspolicyeditor/client/PolicyListBoxWidget.java 2008-03-11 00:14:53 UTC (rev 33204)
@@ -45,8 +45,9 @@
private VerticalPanel vp = new VerticalPanel();
private String READ_RIGHT = "r";
+ private String WRITE_RIGHT = "w";
+
//private String READ_RIGHT = "Read";
- private String WRITE_RIGHT = "w";
//private String WRITE_RIGHT = "Write";
/**
@@ -86,9 +87,11 @@
String label = "u: (";
Right[] rights = users[i].getRights();
+ //Window.alert("User: " + users[i].getId() + " (Number of rights: " + rights.length + ")");
boolean readExists = false;
for (int k = 0; k < rights.length; k++) {
+ //Window.alert("Check for READ right: " + rights[k].getId());
if (rights[k].getId().equals(READ_RIGHT)) {
readExists = true;
break;
@@ -102,14 +105,17 @@
label = label + ",";
boolean writeExists = false;
for (int k = 0; k < rights.length; k++) {
- if (rights[k].equals(WRITE_RIGHT)) {
+ //Window.alert("Check for WRITE right: " + rights[k].getId());
+ if (rights[k].getId().equals(WRITE_RIGHT)) {
writeExists = true;
break;
}
}
if (writeExists) {
+ //Window.alert("WRITE exists");
label = label + WRITE_RIGHT;
} else {
+ //Window.alert("WRITE does NOT exist");
label = label + "-";
}
@@ -123,6 +129,7 @@
for (int i = 0; i < groups.length; i++) {
String label = "g: (";
Right[] rights = groups[i].getRights();
+ //Window.alert("Group: " + groups[i].getId() + " (Number of rights: " + rights.length + ")");
boolean readExists = false;
for (int k = 0; k < rights.length; k++) {
@@ -139,7 +146,7 @@
label = label + ",";
boolean writeExists = false;
for (int k = 0; k < rights.length; k++) {
- if (rights[k].equals(WRITE_RIGHT)) {
+ if (rights[k].getId().equals(WRITE_RIGHT)) {
writeExists = true;
break;
}
More information about the Yanel-commits
mailing list