As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
/alfresco/d/d/workspace/SpacesStore/771fbc61-d11a-4685-8a4d-143c310d07f0/image.png?ticket=TICKET_fb8dfe0f9fdf48b62e428fbe8f6665ddab01db55
<script type="text/javascript"> <!– function func() { var link = document.getElementById("my"); link.setHTML('<a href="' + AWPr.encodeUrl("/alfresco/wcservice/quality/quality2") + '">Click Here</a>'); } // –> </script> <body onload="func();"> <div class="content"> <div id="articles"> <div id="right"> <p id="my">temp</p> ….(other stuff)
The other supported scenario is for an outer webscript calling an inner webscript using an AJAX call much like what you see with MySpaces and MySpacesPanel.
mysql> status; ————– mysql Ver 14.12 Distrib 5.0.51b, for apple-darwin9.0.0b5 (i686) using readline 5.0 Connection id: 71 Current database: Current user: root@localhost SSL: Not in use Current pager: stdout Using outfile: '' Using delimiter: ; Server version: 5.0.51b-log MySQL Community Server (GPL) Protocol version: 10 Connection: Localhost via UNIX socket Server characterset: latin1 Db characterset: latin1 Client characterset: latin1 Conn. characterset: latin1 UNIX socket: /tmp/mysql.sock Uptime: 4 days 22 hours 27 min 10 sec Threads: 22 Questions: 203200 Slow queries: 0 Opens: 175 Flush tables: 1 Open tables: 169 Queries per second avg: 0.477
Hi,What's happening is that the MySpaces webscript adds a cookie with the Alfresco ticket in it to the client browser when the webscript is first rendered. Subsequent calls to the Alfresco download servlet will then be authenticated as the Liferay user.The portlet will call the Alfresco login webscript initially to get an Alfresco ticket for the Liferay user. As a side note, this ticket is sent on every request from the AWPr portlet instance to Alfresco via a URL argument called 't'. This is to allow webscript authors to do whatever they want with that ticket.If you copied the Alfresco download URL and pasted it into a browser that doesn't have the Alfresco cookie you will be redirected to the Alfresco login page. But if you add the parameter 'ticket=TICKET_<ticket-value>' you will be able to download the document if the user who owns the ticket has read rights on it.The drawback here is that you wouldn't be able to robustly have more than one portlet on the same portal page displaying webscripts that serve download URLs from different unclustered Alfresco servers because the cookie would keep getting overwritten. The only way would be to append the ticket to the download URL like so: /alfresco/d/d/workspace/SpacesStore/771fbc61-d11a-4685-8a4d-143c310d07f0/image.png?ticket=TICKET_fb8dfe0f9fdf48b62e428fbe8f6665ddab01db55 This is ok but not desirable since accessing this URL from any browser will authenticate the request as that user which could pose a security risk.–Alaaeldin
Hi,Changing STAr's code won't help. When you're not logged in to Liferay and access an AWPr portlet it will try to access the webscript as a guest user. To do what you want you will need to change the code of AWPr, not STAr. You will need to change the code that attempts to access the webscript as an Alfresco guest user and make it get a ticket for a hardcoded user called 'liferayguest'.Hope this helps,–Alaaeldin
Hi,You might find the following thread helpful in answering some of your questions:http://forums.alfresco.com/en/viewtopic.php?f=9&t=1720Cheers,–Alaaeldin
Alfresco 3Stable CIFS share becomes unstable with "UserTransaction being garbage collected without a commit() or rollback()." error
Sure thing:https://svn.rivetlogic.org/repos/rivets/utils/star/Please also be mindful of the licensing for STAr (GPL) and AWPr (AGPL).Thanks,–Alaaeldin
Hi, Thanks for your work, Alaaeldin. I'm having problems working with:Liferay Portlet 5.2.2Alfresco Labs 3Stable Have everyone connected them?. I thought it was imposibble because:Alfresco 3Stable CIFS share becomes unstable with "UserTransaction being garbage collected without a commit() or rollback()." error, see https://issues.alfresco.com/jira/browse/ETHREEOH-1553 for more information.