return false;
}
}
private List<String> getPermissionAutoGrant(String permission) {
Cache cache = delegator.getCache();
EntityCondition condition = EntityCondition.makeCondition(UtilMisc.toMap("permissionId", permission));
List<String> autoGrants = cache.get("SecurityPermissionAutoGrant", condition, "EntityAuthorization.autoGrants");
if (autoGrants == null) {
autoGrants = FastList.newInstance();
List<GenericValue> values = null;
try {
values = delegator.findList("SecurityPermissionAutoGrant", condition, null, null, null, true);
} catch (GenericEntityException e) {
Debug.logWarning(e, module);
}
if (UtilValidate.isNotEmpty(values)) {
for (GenericValue v : values) {
autoGrants.add(v.getString("grantPermission"));
}
}
cache.put("SecurityPermissionAutoGrant", condition, "EntityAuthorization.autoGrants", autoGrants);
}
return autoGrants;
}