Share /service acces with webclient authentication

14 views
Skip to first unread message

Igor Blanco

unread,
Jan 3, 2012, 9:27:34 AM1/3/12
to share-ext...@googlegroups.com
Hi everyone:

We are trying to transform our "log refresher"  development into an administration console in Share. Our console calls a custom webscript using AJAX to make all the log refreshing.

The same/similar webscript is used twice. One is hosted in the repository and is called through "/share/proxy/alfresco/service/..." so that the Share session authentication is used. This webscript refreshes the logging options for the repository. 

We are trying to do the same but for the webscript hosted in Share, that should refresh Share's log4j properties, not repository's. Although it works an HTTP authentication window pops-up, due to the fact we are accesing the webscript through "/share/service/...". In share there doesn't seem to be anything like "/share/wcservice..." or "/share/proxy/share..." so how could I access a Share webscript from an AJAX call??? 

Is there any Share component that does this or something similar ? Having the Share webscript without authentication is not an option as it would allow anyone to be able to change logging parameters an reload log files. 

Thanks

--
Igor Blanco González
Binovo IT Human Project
e-mail: ibl...@binovo.es
Telf. :   943 493611 - 690229375
Dirección:
                         Astigarraga Bidea 2
                          Planta 6. - Ofi. 3-2 
                    20180 Oiartzun ( Gipuzkoa )

Will Abson

unread,
Jan 3, 2012, 9:37:34 AM1/3/12
to share-ext...@googlegroups.com
Try /share/page/path/to/webscript

If that doesn't work I'd suggest you ask in the Alfresco forums, since
they tend to be monitored by the developers themselves.

Cheers,
Will.

> --
> You received this message because you are subscribed to the Google Groups
> "Share Extras Development" group.
> To post to this group, send email to share-ext...@googlegroups.com.
> To unsubscribe from this group, send email to
> share-extras-de...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/share-extras-devel?hl=en.

Florian Maul

unread,
Jan 3, 2012, 10:53:32 AM1/3/12
to share-ext...@googlegroups.com
Hi Igor,

Will's suggestion with /share/page/... should work. AFAIR /share/service/ always pops up the a basic auth window, even if you are logged in to Share.

Your console plugin sounds interesting btw. Are you updating the log4j.properties manually and then use the webscript to reload it? Did you know you can set the log level from a webscript directly? 


In Java:


Logger logger = Logger.getLogger("org.alfresco");

Level level = Level.toLevel(level);

logger.setLevel(level);


Also implemented as a hidden feature in the Javascript Console ;-)

 

logger.setLevel("org.alfresco.repo.lock", "DEBUG");



Regards,
Florian

2012/1/3 Igor Blanco <ibl...@binovo.es>

--
Reply all
Reply to author
Forward
0 new messages