留言板

assign view permission for non logged in user in documents and media folder

thumbnail
Kalai Arasan,修改在6 年前。

assign view permission for non logged in user in documents and media folder

Regular Member 帖子: 127 加入日期: 13-1-2 最近的帖子
Hi,
I need to assign view permission for non logged in user for the images under documents and media folder. Images will be uploaded into the particular folder in Documents and Media in control panel and the image url will be taken to display in front end. Here what I need is, I need to access the image manually using image url on the images folder without login into liferay. By setting view permission to Guest Role for each images it will work fine.
But I don't need to give permission for every images . by giving Guest view permission for the folder containing images its not working. Could you please assist for me?
thumbnail
Djamel TORCHE,修改在6 年前。

RE: assign view permission for non logged in user in documents and media fo

New Member 帖子: 18 加入日期: 14-10-21 最近的帖子
Hi,
Are you uploading your images programmatically?

Kind regards,
Djamel
thumbnail
Kalai Arasan,修改在6 年前。

RE: assign view permission for non logged in user in documents and media fo

Regular Member 帖子: 127 加入日期: 13-1-2 最近的帖子
yes I am uploading via programmatically.
thumbnail
Djamel TORCHE,修改在6 年前。

RE: assign view permission for non logged in user in documents and media fo (答复)

New Member 帖子: 18 加入日期: 14-10-21 最近的帖子
Hi,
By code you can grant permission to Guest for folders or files via Service Context,
Please see my reply in this thread and instead of "serviceContext.setAddGroupPermissions(true);" change it to serviceContext.setAddGuestPermissions(true); when creating files or folders.

Kind regards,
Djamel