projects / org / ezproject2010 / ezcore / forum / general / [feature request] custom he...
Find the Exponential Software extensions you want
You need to be logged in to post messages in the forums. New users may register here.
Member since: Posts: 19 |
Monday 22 September 2008 12:59:47 am Hi André,
Even we use ajax, we need to manage headers to allow our reverse proxies (squid) to cache some ajax answers. index_ajax.php does'nt manage custom headers settings from site.ini To fix that, I put the following code in index_ajax.php
|
|
Member since: Posts: 19 |
Monday 22 September 2008 8:08:19 am sorry, I didn't see that custom headers are supported since revision 21 on the repository
thanks ! |
|
Member since: Posts: 145 |
Tuesday 23 September 2008 1:05:12 am :)
One thing: Should index_ajax.php check user/login and module/view permission, or should it assume that you want those to be reacable when module is defined in ExtensionAjaxRepositories? Alternatives: 1. Like now, it is always checked. 2. Do not check it and gain some performance (from ~50% to ~100% faster then index.php), and document this so developers know what happens if he define a module in ExtensionAjaxRepositories. 3. Add AnonymousAjaxAccessList and PolicyAjaxOmitList settings so this is configurable. eZ Online Editor 5.1: http://projects.ez.no/ezoe || eZJSCore 1.1(Ajax): http://projects.ez.no/ezjscore || eZSearch++(better search results): http://projects.ez.no/ezsearchpro |
|
Member since: Posts: 19 |
Tuesday 23 September 2008 7:18:59 am Hi André,
I expected from you to work on this feature ! On one hand : we are switching our extensions to ezcore to make our ajaxes more efficient: so the faster it gets, the better it is ! On the other hand, it's quite useful for developers to manage restrictions using the builtin-in ezpublish privileges manager like every other extensions... And, it's usefull to manage privileges per-view and per-role as provided in ezpublish (for example: if you have an extension managing comments, you might give access to 'anonymous' to the view listing comments, but not to the view adding comment...) I think ezcore could mix the item 1 and 3 : implement the whole privileges system from eZpublish and implementing the AnonymousAjaxAccessList & PolicyAjaxOmitList settings. Developpers could choose to rely on eZPublish to manage rights and have more flexibility or to choose to use PolicyAjaxOmitList setting and have a faster result. Damien |
|
Member since: Posts: 145 |
Wednesday 24 September 2008 1:07:31 am Ok, fixed in rev 24 (added support for AnonymousAccessList).
So decided to use the settings already in use by ezp. eZ Online Editor 5.1: http://projects.ez.no/ezoe || eZJSCore 1.1(Ajax): http://projects.ez.no/ezjscore || eZSearch++(better search results): http://projects.ez.no/ezsearchpro |
|
Member since: Posts: 19 |
Wednesday 24 September 2008 6:49:27 am Hi André,
Something's wrong. You need to set both AnonymousAccessList and PolicyOmitList settings to make anonymous access work well... ----- One thing : Couldn't index_ajax.php check privileges more efficiently ? If AnonymousAccessList or PolicyOmitList are set, it don't need to fecth current user and its privileges in database ... Here a code(non-tested) that could do the trick :
|
|
Member since: Posts: 145 |
Tuesday 30 September 2008 3:59:06 am hmm, I guess your right that the current code isn't entirely correct and that it is to strict.
But your example doesn't seem to be valid either. I did a test on index.php by defining AnonymousAccessList but not PolicyOmitList and it checked permission (I didn't get access). I'll try to get an overview of how index.php does this and copycat it with less overhead.. eZ Online Editor 5.1: http://projects.ez.no/ezoe || eZJSCore 1.1(Ajax): http://projects.ez.no/ezjscore || eZSearch++(better search results): http://projects.ez.no/ezsearchpro |
|
Member since: Posts: 145 |
Tuesday 30 September 2008 5:09:17 am Ended up with:
eZ Online Editor 5.1: http://projects.ez.no/ezoe || eZJSCore 1.1(Ajax): http://projects.ez.no/ezjscore || eZSearch++(better search results): http://projects.ez.no/ezsearchpro |
|
Member since: Posts: 19 |
Friday 03 October 2008 4:56:39 am It sounds good, I will test it asap
Have a nice week end. Damien |
You need to be logged in to post messages in the forums. New users may register here.