I'm looking to get some advice on setting up a workflow and schema for a 
project I'm working on. Here is a bit of background on the project... The 
project is an online file management system. It has hundreds of users at the 
moment. There are 1,000,000+ files and folders already existing in the system 
and it's growing rapidly. I want all the files/folders to be indexed and 
searchable. I have no problem adding file data (i.e. file/folder name, creation 
date, author name, etc) to the index. The part that I'm struggling with is that 
the system implements file/folder permissions for all the users. So users won't 
be able to access all 1,000,000+ files/folders on the site. So the user's 
search results should only return things they can access.
I keep a MySQL database of users' permissions. On the site, they will see the 
initial list of all top-level folders they can access, then they can navigate 
into sub-folders and they will only see the sub-folders they can access. So the 
permissions for all the files and folders are set and working. I just need to 
enforce these access permissions when the user runs a search on the index.

I must also keep in mind that user permissions might be changed periodically. A 
user might be granted access to some newly created folders, or their access 
permission for existing folder might be revoked. So I need to keep this as 
"dynamic" as possible.

Can anyone give me some general advice or pointers for setting up such an index 
that enforces user access permissions for this type of file/folder search?

Thanks,

Matt

Reply via email to