组合视图 统一视图 树状图
讨论主题 [ 上一个 | 下一个 ]
toggle
Ed F.
Automatic Guest permissions for all newly added documents
2009年11月17日 上午7:48
答复

Ed F.

等级: Expert

帖子: 280

加入日期: 2006年6月26日

最近的帖子

I have a portlet that uses Document Library for uploads. I'm calling DLFileEntryLocalServiceUtil.addFileEntry, and I supply true for addCommunityPermissions and addGuestPermissions, but every file that's uploaded is still not accessible to guests. The only way I can see to fix it is to manually add guest view permissions to each file as it's uploaded. This is getting tedious.

The folder has guest view permissions. It's not in a private page. Adding guest view permissions to each file works.

Anyone know of a way that every file added to a certain folder automatically is viewable by guests?

Thanks!
-Ed
Minhchau Dang
RE: Automatic Guest permissions for all newly added documents
2009年11月17日 下午2:49
答复

Minhchau Dang

LIFERAY STAFF

等级: Expert

帖子: 349

加入日期: 2007年10月22日

最近的帖子

The "addCommunityPermissions" and "addGuestPermissions" refer to the values specified in [url=http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Using+Liferay's+Permission+System+from+a+portlet]resource actions.

Currently, there is no built-in way for files to automatically inherit the permissions of their parent folders, meaning that in the current code base, you will need to apply code customizations (most likely a model listener) to add those permissions.