English (United Kingdom)
English (United States)
(Opens New Window)
Mark as an Answer
Getting site folders based on user roles
February 14, 2013 3:46 PM
Rank: Junior Member
Join Date: July 19, 2012
I want to know if there is a liferay API call that will return only the folders on the site that the current user has access too.
Let's say I use the simple DLFolderLocalServiceUtil.getDLFolders(-1, -1) call to return all folders on the site. Will this return all folders on the site, or will it only return the folders that the currently logged on user executing this code has access to?
I know I could get all the folders than cross reference them with the current user's role and then figure out if a user can view them, but I don't want to do that.
I suppose this question boils down to this: Is it the developer's responsibility to ensure a user only has access to files and folders corresponding to their role? Or will liferay take care of this for me in it's API.
Sign in to vote.
Please sign in to flag this as inappropriate.