掲示板

delete download link Documents and media library

thumbnail
11年前 に Path Finder LifeRay によって更新されました。

delete download link Documents and media library

Expert 投稿: 262 参加年月日: 09/09/18 最新の投稿
Hi All,

i'm using liferay6.1 version... here's my question?

how to delete/disable download link for the files that i have uploaded in the documents and media library..
specifically...

i have uploaded a document in D/M Library portlet for guest role i have kept the view permission now the download link is active here.

how to remove the download link for the D/M library portlet.


regards
path
thumbnail
11年前 に Alireza Zare によって更新されました。

RE: delete download link Documents and media library

Regular Member 投稿: 110 参加年月日: 10/09/03 最新の投稿
If you mean the download url next to WebDAV url, you can just do it by hooking the view_file_entry.jsp in ROOT\html\portlet\document_library.
thumbnail
10年前 に Path Finder LifeRay によって更新されました。

RE: delete download link Documents and media library

Expert 投稿: 262 参加年月日: 09/09/18 最新の投稿
Hi All,

Ples find the screen shot. i'm i have uploaded a document in the document and media library and i have given user only view permissions.

but still download button appears when i click the document.

how to delete the download link for a particular user based on permissions and roles.

please let me know

regards
path finder.

添付ファイル:

thumbnail
10年前 に Antoine Comble によって更新されました。

RE: delete download link Documents and media library

Regular Member 投稿: 232 参加年月日: 12/09/07 最新の投稿
Hi,

You just have to hook the document and media library portlet as describe in previous post.

Antoine
thumbnail
10年前 に Path Finder LifeRay によって更新されました。

RE: delete download link Documents and media library

Expert 投稿: 262 参加年月日: 09/09/18 最新の投稿
Antoine Comble:
Hi,

You just have to hook the document and media library portlet as describe in previous post.

Antoine


Hi Antoine,

here's the requirement ...... a user is only able to view the document. He is not able to save, copy or do anything else with that document.

Can we do that by hooking... if so how to configure it to a particular user?...also for some users i need to enable download link and for some it should be disabled....it is not the link i'm talking both the link and download button that appears on top of document should be disabled..

please help in this....

Thanks
thumbnail
10年前 に Path Finder LifeRay によって更新されました。

RE: delete download link Documents and media library

Expert 投稿: 262 参加年月日: 09/09/18 最新の投稿
Hi All,

can't we do this with the roles and permissions given by liferay default..

Thanks.
thumbnail
10年前 に Antoine Comble によって更新されました。

RE: delete download link Documents and media library

Regular Member 投稿: 232 参加年月日: 12/09/07 最新の投稿
Hi,

That you cant do is not possible in Liferay : http://jira.portletfaces.org/browse/LPS-33944?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel.

But, you can create 1 role can download document and assign wanted users to this role.

After doing this, you override file_entry_action.jsp and edit this block :

<c:if test="<%= DLFileShortcutPermission.contains(permissionChecker, fileShortcut, ActionKeys.VIEW) %>">
					<liferay-ui:icon image="download" message="<%= LanguageUtil.get(pageContext, &quot;download&quot;) + &quot; (&quot; + TextFormatter.formatKB(fileEntry.getSize(), locale) + &quot;k)&quot; %>" url="<%= themeDisplay.getPortalURL() + themeDisplay.getPathContext() + &quot;/documents/&quot; + fileShortcut.getFileShortcutId() %>" />
				</c:if>


Change the if condition with your own condition to search if user has role can download to display the button.

Hope this help you,

Antoine
thumbnail
10年前 に Manish Yadav によって更新されました。

RE: delete download link Documents and media library

Expert 投稿: 493 参加年月日: 12/05/26 最新の投稿
Path Finder LifeRay:
Hi All,

can't we do this with the roles and permissions given by liferay default..

Thanks.


you can disable or delete download link using hook .if you want to show for specific role then use permissionchecker

\html\portlet\document_library\view_file_entry.jsp