I'm writing a depsktop application (in Java) that interacts with a database which stores mostly requirements documents,but I have a bit of a dilemma. Specifically, a problem with managing user access.
To illustrate, I store all details on the folder structures in a single table. However, I would like to institute a user-group mechanism similar to Linux/Unix systems where you can only add/mod/del the folders that you have permissions for. Of course, I can only assign database permissions to a table or columns, not individual rows which represent the folders they have access to.
One solution to this is to give each folder its own table, and then only give update/insert/delete access to certain users but that would be nothing short of a nightmare as the # of tables would explode to an unmanageable level.
The second option is to create a server side process that sits between the database and clients, which would return the list of folders that the user is stated to have (removing the whole issue of table privileges, buy requiring now that I write a network protocol to talk with this process, instead of just using the jdbc driver directly)
Final option is triggers, though the database I have to support (mysql) doesn't make it easy for me to reject. I was also hoping, given the frequency of access, to avoid triggers due to the added computation and slower performance.
None are ideal but I'm running out of ideas.
Recommendations?