List Info

Thread: usecase-policies config path hardcoded within global-sitemap ...




usecase-policies config path hardcoded within global-sitemap ...
user name
2006-04-10 21:41:57
Andreas Hartmann wrote:

> Thorsten Scherler schrieb:
> 
>> El lun, 10-04-2006 a las 16:37 +0200, Michael
Wechner escribió:
>>
>>> Michael Wechner wrote:
>>>
>>>> Hi
>>>>
>>>> I have noticed that within
>>>>
>>>> 
http://staging.ejo.ch/lenya/ejo/authoring/index.html
>>>
>>>
>>> sorry for this copy/paste error. It should
read:
>>>
>>> src/webapp/global-sitemap.xmap
>>>
>>>> the
>>>>
>>>> <map:act
type="resource-exists" 
>>>>
src="lenya/pubs//config/ac/usecase-policies.xml&qu
ot;>
>>>>          <map:transform
type="usecasemenu"/>
>>>>        </map:act>
>>>>
>>>> is hardcoded instead being read from the
ac.xconf
>>>>
>>>> I guess it would make sense to use an
InputModule (e.g. 
>>>> XMLInputModule) for this, right?
> 
> 
> IMO the check could be removed. I could imagine that
the performance
> gained by the action (if the file doesn't exist) is
similar to the
> performance lost by the existence check ...

I haven't checked how this transformers works, but in the
case of the 
menu transformer one can speed it up a lot by checking it's
actually 
needed (authoring) or not (live)
> 
> 
>> I am not sure but would 
>>
...src="fallback://lenya/config/ac/usecase-policies.xm
l">
>> not do the trick?
> 
> 
> No, the problem is, like Michi mentioned, that the
config
> file is accessed directly and not via the API. Only the
> UsecaseAuthorizer may know where the policies are
stored.

right, we should access the UsecaseAuthorizer and not the
config itself 
... something like an UsescaseAuthorizerExistsInputModule
...

Michi



> 
> -- Andreas
> 
> 
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: dev-unsubscribelenya.apache.org
> For additional commands, e-mail: dev-helplenya.apache.org
> 
> 


-- 
Michael Wechner
Wyona Inc.  -   Open Source Content Management   -   Apache
Lenya
http://www.wyona.com     
        http://cocoon.apache.
org/lenya/
michael.wechnerwyona.com                        michiapache.org


------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribelenya.apache.org
For additional commands, e-mail: dev-helplenya.apache.org

usecase-policies config path hardcoded within global-sitemap ...
user name
2006-04-11 07:51:49
Michael Wechner schrieb:

[...]

> I haven't checked how this transformers works, but in
the case of the 
> menu transformer one can speed it up a lot by checking
it's actually 
> needed (authoring) or not (live)

You're right, but this has to be configurable, since it
cannot
be applied generally. Some publications need the usecase
policies
in the live area as well (e.g., for administration tasks).


>>> I am not sure but would 
>>>
...src="fallback://lenya/config/ac/usecase-policies.xm
l">
>>> not do the trick?
>>
>>
>> No, the problem is, like Michi mentioned, that the
config
>> file is accessed directly and not via the API. Only
the
>> UsecaseAuthorizer may know where the policies are
stored.
> 
> right, we should access the UsecaseAuthorizer and not
the config itself 
> ... something like an
UsescaseAuthorizerExistsInputModule ...

Hmmm - I wouldn't add this logic to the sitemap. The
optimization
could be done by the transformer. If it doesn't want to
interfere, because no usecases are protected, then it can
just
pass through the SAX events. In this case, the performance
impact
would be negligible:

public void startElement(...) {
     if (usecasesAreProtected) {
         ...
     }
     else {
         super.startElement(...);
     }
}


If you think this is not sufficient, we could add the logic
to the
access control module:

   <map:select type="parameter">
     <map:parameter
name="parameter-selector-test"
                   
value="{access-control:usecases-protected}"/>
     <map:when>
       <map:transform ... />
     </map:when>
   </map:select>


-- Andreas




------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribelenya.apache.org
For additional commands, e-mail: dev-helplenya.apache.org

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )