-
1. Re: s:hasPermission with only two parameters
shane.bryzak Mar 13, 2007 12:21 AM (in response to codelion)EL doesn't support method overloading for functions, although once we integrate the newer version we should have vararg support.
-
2. Re: s:hasPermission with only two parameters
codelion Mar 13, 2007 8:07 PM (in response to codelion)Then how about two different names, e.g. s:hasPermission with only two parameters and s:hasPermissionFor with three parameters.
I mean, s:hasPermission with null as 3rd parameter is getting old quickly.
Plus, I don't think there is enough discussion in the reference documentation about what will happen with the third parameter. It discusses entity permissions, which is a different topic, but not e.g. how the rule engine sees if as a third parameter one passes a name that's bound to an object from a differently named class, or what happens if that object sometimes is from one class, other times from a subclass. It doesn't really say for sure what the rule engine will see, let alone an example.
Maybe I have missed something, in which case I apologize. -
3. Re: s:hasPermission with only two parameters
shane.bryzak Mar 13, 2007 9:22 PM (in response to codelion)The new EL integration is scheduled for the 1.3.0 release. I know it's a pain to include the extra "null" parameter for permission checks, however I'd rather not add a new method for the 1.2.1 release just to have to remove it again in 1.3.0 and break backwards compatibility.
I agree the documentation is a little sparse in this area, although it does indeed explain it. As soon as varargs are supported the docs will be updated with a new section explaining permission checks in more detail.