[TYPO3-50-general] FLOW3 ACL/Policy syntax discussion

Andreas Förthner Andreas.Foerthner at netlogix.de
Thu Jul 2 13:03:57 CEST 2009


Hi Bastian,

> I've read your message twice because I didn't really get it the first time.
> This is impressive, and I don't think the syntax is too complex - 
> compared to its power.

good to hear that!

> What concerns me a bit is that a lot of "special" syntax is in quotes 
> which makes configuration error-prone as it's difficult to provide 
> support in future versions (like autocompletion or  meaningful error 
> messages) when the syntax gets more complex.

Yes, that's true. For now I just took the AOP pointcut expression strings, but perhaps we should really find something 
better here.

> deleteMethods
>   methods: ["F3\FooPackage\BasicClassValidator->delete.*()"]

why do we need the []?

> theIntegrativeResource:
>   methods: ["F3\FooPackage\BasicClassValidator->delete.*()"]
>   entities: ["F3\TYPO3\Domain\Page", "F3\TYPO3\Domain\Site"]
>   resources: ["xyz"]

How would you combine two method designators with an operator like && or ||? Just imagine something like that:

deleteMethods:
   methods: ["F3\FooPackage\BasicClassValidator->delete.*()"] || ["F3\FooPackage\AnotherClassValidator->delete.*()"]

Of course this is not yaml syntax, but how could we express something like that?

And what about combining resources directly by their names? something like that:

theIntegrativeResource:
    methods: ["F3\FooPackage\BasicClassValidator->delete.*()"] && deleteMethods

You see the point? Or would this scenario then be written like that:

theIntegrativeResource:
    methods: ["F3\FooPackage\BasicClassValidator->delete.*()"]
    resources: ["&&deleteMethods", "||..."]

Or do we even need something like that?

theIntegrativeResource:
         methods: ["something"]
     &&
         entities: ["something different"]
     ||
         resources: ["xyz"]

I think splitting the string is a really good idea, but at the moment I don't really know how to get the combining 
operators in there again. Do you have any ideas?

> ..or mabye turn it around:
> 
> methods:
>   deleteMethods: "method(F3\FooPackage\BasicClassValidator->delete.*())"
>   ...
> 
> entities:
>   pageModel: "F3\TYPO3\Domain\Page"
>   siteModel: ""F3\TYPO3\Domain\Site"

I think here we would lose the possibility to combine different resource types under one name, right?

>> //Files/ResourceManager. Any syntax proposals so far?
> 
> I guess a problem will be to differentiate between relative and absolute 
> paths, right? and there might be URI-resources I guess..
> What about using the standard protocol prefixes file:///, http:// etc?

Perhaps this is the easiest way of doing it. I'm really not sure about the whole ResourceManager concept and if this 
proposal would work, so if anyone who knows could tell us?

>> deleteMethods:  ACCESS_DENY($param.check > 10)
> 
> that's neat! and it would work with objects too, right:
> 
> deleteMethods: ACCESS_DENY($param.article.category == foo && 
> $param.article.availability == TRUE)

Yep, this is definitely planned. But should we use the '.' or '->'? And what about the global variables I introduced 
like $param or $context? Do we have a better syntax/name for them? Or is it just ok?

> All in all, it looks very good to me. And I don't think, it's too 
> complicated - at least as soon as we'll have a fancy gui for it ;)
> But I'd try to make the syntax as explicit as possible!

Cool. Thank's a lot for your feedback! I hope we can discuss the whole topic a bit further, to bring it to a stable concept.

Greets Andi


More information about the TYPO3-project-5_0-general mailing list