View Single Post
Old 11-26-2014, 11:20 PM   #4
dstrohl
Junior Member
dstrohl began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Mar 2009
Device: Iliad
Thanks, and I agree

Quote:
Originally Posted by kovidgoyal View Post
There is only a single instance of the Server class. You would have to restrict the data you send per request. You would use the same mechanism as the current

--virtual-library

option to the server, except that the virtual library to use would now need to be gotten based on the authenticated user per request. There are various caching mechanisms in the server to speed up --virtual-library, which might have to be generalized as well. The database API is perfectly capable of returning data for different restrictions in the same isntance.
Thanks, that is what it looked like, I was hoping for the other approach, but the more I poked through the code, the more it looked like that would be the case.

Quote:
Originally Posted by kovidgoyal View Post
On a general note, calibre's content server is really designed to be a personal server not one for distribution to multiple parties. So while I wont refuse this functionality, it has to be implemented in a way that does not compromise the core use case.

I agree there, there are many reasons that this would not be a good implementation for a larger scale server, starting (and and probably ending) with security. I am NOT trying to implement a real security system here, simply a way of "hiding" content from certain groups, or offering more focused content based on the login.

My thought is to use the following assumptions:

- If there are no tenants configured, everything operates just like normal:
- There would be a checkbox and command line switch to turn off the functionality even if they were configured, for troubleshooting if nothing else.
- if a user connects with no user credentials passed, it would default to the virtual library (or lack of one) defined in the normal ui. (so, if you want to make sure a user name was needed for everything, they would also have to configure the user info in the main screen.

This should have a pretty low impact on any existing systems, and make it easier to pull or fix later...

The basic use case for this that I am shooting for is something like a family where all the books are in the library, but the kids can see any of the fiction ones that don't have a tag "adults-only", spouse 1 (with a home business) can see all of the family stuff, plus some reference books for their business, and spouse 2 can see all of the family stuff as but not the business books.

I can also see it as a first pass filter, this would allow me to define a "server" in marvin that would publish just reference docs, and another one that just had the current fiction that I was interested in, and a third server that had everything.

In any case, the goal is not to go away from the idea of a personal server, just to broaden it a little. (make sense?)

Dan
dstrohl is offline   Reply With Quote