reset password
Author Message
kknaur
Posts: 540
Posted 19:20 Nov 24, 2010 |

My search allows the user to see any public folders that another user has created.  Now when you click on that folder it takes you back to the file manager and nothing in that folder is displayed because part of my SQL queries for listing files under a folder contains the condition that the files must belong to the current user.  I don't know how to display public files under a public folder that belongs to another user because if I change my fileDaoImpl queries to include public files, then those public files also show up in the current user's file display.  Do we need to worry about displaying contents of public folders belonging to another user, or can we just focus on including public files in the search only?

cysun
Posts: 2935
Posted 21:20 Nov 24, 2010 |
kknaur wrote:

... part of my SQL queries for listing files under a folder contains the condition that the files must belong to the current user...

You shouldn't have that condition. A public folder by definition should be "public", meaning a user should be able to see the list of the files in the folder, though the user cannot download those files unless the files themselves are also public. This behavior is similar to how public/shared folders work in a typical file system.

kknaur
Posts: 540
Posted 21:32 Nov 24, 2010 |

So, if a user has uploaded a public folder then another user should be able to see it in their own instance of the file manager even without doing a search that would include that folder in the results?


In this case what happens if one user uploads a top level folder that is private and a folder in that folder is public.  How could another user see that child folder if its parent is private?

cysun
Posts: 2935
Posted 11:58 Nov 28, 2010 |
kknaur wrote:

So, if a user has uploaded a public folder then another user should be able to see it in their own instance of the file manager even without doing a search that would include that folder in the results? ...

No, a public folder by another user should only show up in search results.