You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by buzlite <bz...@gmail.com> on 2009/08/07 14:05:19 UTC
ModelPermission.evalRoleMember() was disabled. why?
In the file /framework/service/src/org/ofbiz/service/ModelPermission.java
taken from the trunk.
I noticed that a block of code
org.ofbiz.service.ModelPermission.evalRoleMember() was disabled.
private boolean evalRoleMember(GenericValue userLogin) {
if (nameOrRole == null) {
Debug.logWarning("Null role type name passed for evaluation",
module);
return false;
}
GenericDelegator delegator = userLogin.getDelegator();
List<GenericValue> partyRoles = null;
/** (jaz) THIS IS NOT SECURE AT ALL
try {
partyRoles = delegator.findByAnd("PartyRole", "roleTypeId",
nameOrRole, "partyId", userLogin.get("partyId"));
} catch (GenericEntityException e) {
Debug.logError(e, "Unable to lookup PartyRole records", module);
}
**/
if (UtilValidate.isNotEmpty(partyRoles)) {
//wt;
//partyRoles = EntityUtil.filterByDate(partyRoles);
if (UtilValidate.isNotEmpty(partyRoles)) {
return true;
}
}
return false;
}
Could someone tell me why this is so?
Thanks in advance.
--
View this message in context: http://www.nabble.com/ModelPermission.evalRoleMember%28%29-was-disabled.-why--tp24863572p24863572.html
Sent from the OFBiz - Dev mailing list archive at Nabble.com.