We could. It would be an easy change to make. I would like to think about it for a while. Maybe even hear from others on the subject.

I've been trying to move the project in the other direction - get the OFBiz-specific syntax out of the expressions. From my perspective, the less we mess around with syntax extensions, the fewer bugs we will encounter.

A good example is the problems encountered and the work required to support auto-vivify. In that case, it was worth working on because that is a very powerful and needful extension.

I'm even hesitant about making this permission extension. I would rather see the security component handle permission expressions, but that would require a lot of coding.

-Adrian

Jacopo Cappellato wrote:
I know this, but couldn't we replace them before calling the UEL processor?

Jacopo

On Apr 30, 2009, at 7:43 PM, Adrian Crum wrote:

Those keywords are not recognized by UEL.

-Adrian

Jacopo Cappellato wrote:
Adrian,
this is really interesting.
However I think it is time to start thinking to define our own xml friendly keywords for && and || operators; I would like to express that statement with something like this: <set field="hasPermission" value="${(hasPermission['update:context1'] OR hasPermission['update:context2']) AND hasPermission['update:context3']}" type="Boolean"/>
Jacopo
On Apr 30, 2009, at 7:20 PM, Adrian Crum wrote:
<set field="hasPermission" value="${(hasPermission['update:context1'] || hasPermission['update:context2']) &amp;&amp; hasPermission['update:context3']}" type="Boolean"/>

or something like that. I'm still working out the details.

-Adrian

Andrew Zeneski wrote:
That sounds cool. I'm not sure what that would really look like, but nevertheless sounds really cool! :) If you need anything from me let me know...
Andrew
On Apr 30, 2009, at 1:00 PM, Adrian Crum wrote:
Andrew Zeneski wrote:
I'd be happy to discuss additional changes as well (which aren't yet documented) like adding support to check multiple permissions at once, returning a Map of results from that permission check. So, if you or anyone else has a wish list for security, let me know so I can get it all incorporated at the same time.

Btw, I'm working on adding an extension to the UEL that will allow permission expressions.


-Adrian

Reply via email to