Hi all,
I have made a project for sharing the contents of file and folder in alfrecso.The github link for my project is
GitHub - ayushiagrahari95/share-link-expiry-file-and-folder and it is working fine on local but when I have deployed the amps on production,whenever I click on the make public action,a URL is generated on the folder and when I click on that URL,it is asking for authentication (prompts the user to enter the username and password) but on local,the URL is opening properly in the new tab without asking for authentication.
I am unable to figure out why the URL is asking for authentication on prod and not on local.
any help would be greatly appreciated
Thanks
It's cool you made that code available on github, but maybe grab the section you think might be the problem and post it here so people don't have to go hunt for it. For example, what URL are you generating for the folder?
Hello Jeff,
I am trying to call the repo webscript from share side.
The space-list.js file in share-link-expiry-file-and-folder/Ev-share-make-public-share/src/main/resources/META-INF/components/make-public is calling the repo webscript in the following way
Did you add the GUEST user with Consumer access (or higher) to the node?
Yes,I have added the guest access with consumer access to the node in the local as well as production but as I have already told u that the amps of project is working perfectly on local but the issue is actually when I deploy the amps on production.
I can't figure out why it is asking for authentication on production but not on local
It looks like you are calling a repo-tier web script from client-side JavaScript. Is that what you intend? When everything (the browser and the server) is on the same machine, that might work okay, but as soon as your client and server are on different machines, you will run into trouble.
Instead of calling a repo-tier web script from client-side JavaScript, consider calling the Share proxy web script instead. In this case your client-side JavaScript would invoke /share/proxy/alfresco/eu/xfel/make-public/doclist?nodeRef...
Another advantage of doing that is that Share will handle repo authentication for you and you won't have to fool with Guest access.
Hi Jeff,
I have tried ur solution and instead of calling the repo side webscript from client side javascript,I am calling the share proxy webscript in the following way.
var requestUrl = "/share/proxy/alfresco/eu/xfel/make-public/doclist?nodeRef="+ this.options.nodeRef;
it is working without authentication on production,but now the another problem is that when I tried to open the same URL in other browser,the page is not loading.I can't figure out why this is so.
but calling the repo side webscript from client side javascript by
var requestUrl = window.location.protocol + "//" + window.location.host + "/alfresco/s/eu/xfel/make-public/doclist?nodeRef=" + this.options.nodeRef + "&guest=true";
is working for other browsers also but is asking for authentication.
I can't figure out why this is so.....
Any help is greatly appreciated
Regards
Ayushi Agrahari
Hi all,
After doing googling,I have changed the authentication in the webscript xml descriptor in the following way.In doclist.get.desc.xml,I have changed
<authentication>guest</authentication>
to
<authentication runas="guest">none</authentication>
and now it is working perfectly and is no longer asking for authentication while calling the webscript.
Regards
Ayushi Agrahari
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.