Fórum

Assest Publisher - downloading asset

Lee Chamberlain, modificado 7 Anos atrás.

Assest Publisher - downloading asset

Junior Member Postagens: 92 Data de Entrada: 05/05/16 Postagens Recentes
Is it possible to download content in Asset Publisher when I click on the link.

If it's set to "Show full content" the page reloads with an empty asset publisher

If it's set to "View in content" I'm taken to a page with full download and edit privileges which I don't want a casual user to see.

I just need it to download when clicked on.

Thanks
Lee
thumbnail
Samuel Kong, modificado 7 Anos atrás.

RE: Assest Publisher - downloading asset

Liferay Legend Postagens: 1902 Data de Entrada: 10/03/08 Postagens Recentes
Yes, it's possible. You'll need to create your own application display template for the Asset Publisher. The AssetRenderer object has a getURLDownload() method that you can use. However, you'll need to be careful when using this since most asset types don't implement this method.

If it's set to "View in content" I'm taken to a page with full download and edit privileges which I don't want a casual user to see.

If your main concern is the edit privilege, you should just remove the edit permission from those users.
Lee Chamberlain, modificado 7 Anos atrás.

RE: Assest Publisher - downloading asset

Junior Member Postagens: 92 Data de Entrada: 05/05/16 Postagens Recentes
Thanks,

Just to confirm it's not an "out of the box" solution, and I don't have to change a few things around in the configuration of the portlet?

My line manager seems to think we've had this working before (I'm not convinced we did).

L
Lee Chamberlain, modificado 7 Anos atrás.

RE: Assest Publisher - downloading asset

Junior Member Postagens: 92 Data de Entrada: 05/05/16 Postagens Recentes
Also we're using 6.2 not 7
Lee Chamberlain, modificado 7 Anos atrás.

RE: Assest Publisher - downloading asset

Junior Member Postagens: 92 Data de Entrada: 05/05/16 Postagens Recentes
My line manager has decided we can see the full wiki of the page through "view in content" as long as an ordinary user can only download the file.

Is it easy to lose/hide the edit, move, move to recycle buttons etc.... for ordinary users?
thumbnail
Samuel Kong, modificado 7 Anos atrás.

RE: Assest Publisher - downloading asset

Liferay Legend Postagens: 1902 Data de Entrada: 10/03/08 Postagens Recentes
My previous comment was for 6.2.

Is it easy to lose/hide the edit, move, move to recycle buttons etc.... for ordinary users?

If your users still need permission to edit/move/etc, then use a JSP hook to hide the relevant options. If they don't need permission to edit/move/etc, then just remove those permissions from the user.
Lee Chamberlain, modificado 7 Anos atrás.

RE: Assest Publisher - downloading asset

Junior Member Postagens: 92 Data de Entrada: 05/05/16 Postagens Recentes
Samuel Kong:
My previous comment was for 6.2.


Ah ok, the link you gave went to 7.0 and couldn't find a 6.2 when I searched for it.

Thanks
Samuel Kong:

Is it easy to lose/hide the edit, move, move to recycle buttons etc.... for ordinary users?

If your users still need permission to edit/move/etc, then use a JSP hook to hide the relevant options. If they don't need permission to edit/move/etc, then just remove those permissions from the user.


Thanks, am struggling setting up new test users as our dev system has inexplicably gone to pot. Bit stressed as I've got 1 day at this job to do a weeks worth of work, but I'll try and find the permission and change it.

Lee
Lee Chamberlain, modificado 7 Anos atrás.

RE: Assest Publisher - downloading asset

Junior Member Postagens: 92 Data de Entrada: 05/05/16 Postagens Recentes
I'm having a nightmare working out what permissions I need to set for an individual user.

Whenever an ordinary user is trying to view a file I get this..

https://mydomain.com/report/-/asset_publisher/g31cB3AV5mEz/document/id/60836?redirect=%2Freport

It doesn't redirect and my asset publisher turns blank.....

How do I get it to redirect?