Foros de discusión

Assest Publisher - downloading asset

Lee Chamberlain, modificado hace 7 años.

Assest Publisher - downloading asset

Junior Member Mensajes: 92 Fecha de incorporación: 5/05/16 Mensajes recientes
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 hace 7 años.

RE: Assest Publisher - downloading asset

Liferay Legend Mensajes: 1902 Fecha de incorporación: 10/03/08 Mensajes recientes
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 hace 7 años.

RE: Assest Publisher - downloading asset

Junior Member Mensajes: 92 Fecha de incorporación: 5/05/16 Mensajes recientes
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 hace 7 años.

RE: Assest Publisher - downloading asset

Junior Member Mensajes: 92 Fecha de incorporación: 5/05/16 Mensajes recientes
Also we're using 6.2 not 7
Lee Chamberlain, modificado hace 7 años.

RE: Assest Publisher - downloading asset

Junior Member Mensajes: 92 Fecha de incorporación: 5/05/16 Mensajes recientes
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 hace 7 años.

RE: Assest Publisher - downloading asset

Liferay Legend Mensajes: 1902 Fecha de incorporación: 10/03/08 Mensajes recientes
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 hace 7 años.

RE: Assest Publisher - downloading asset

Junior Member Mensajes: 92 Fecha de incorporación: 5/05/16 Mensajes recientes
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 hace 7 años.

RE: Assest Publisher - downloading asset

Junior Member Mensajes: 92 Fecha de incorporación: 5/05/16 Mensajes recientes
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?