Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Server

Notices

Reply
 
Thread Tools Search this Thread
Old 05-27-2022, 08:25 AM   #1
martianrock
Junior Member
martianrock began at the beginning.
 
Posts: 9
Karma: 10
Join Date: May 2022
Device: fbreader
Question How to restrict anonymous user access?

Hi, I am trying to restrict anonymous access to a specific tag or vl, my web search found --restrictions CLI option but it does not seem to be available in recent version of calibre-server. Is there alternative to --restrictions now?
tl;dr
I was planning (after reading about --restrictions option) to run 2 instances, one read-only no auth on port 80 restricted to tag:ready (i.e. 'ready' server) and another one with auth but unrestricted on default port 8080 ('staging/work in progress' server). And I was planning to run them both from the same library directory (with one of them being read-only I figured it wound not have write conflicts).
If that setup is not possible, would it be possible to have a sync script which would copy only stuff tagged with tag:ready or vl:ready to another library?
martianrock is offline   Reply With Quote
Old 05-27-2022, 08:38 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,107
Karma: 22669824
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You can define restrictions per user in the modern server. There arent restrictions for anonymous users.
kovidgoyal is offline   Reply With Quote
Old 05-27-2022, 10:27 AM   #3
martianrock
Junior Member
martianrock began at the beginning.
 
Posts: 9
Karma: 10
Join Date: May 2022
Device: fbreader
Quote:
Originally Posted by kovidgoyal View Post
You can define restrictions per user in the modern server. There arent restrictions for anonymous users.
That's unfortunate, I'd think anonymous users would require more restrictions than authenticated ones. Thanks for confirming it!
Is there by any chance a way to copy library and filter it out by tag in on server side (without calibre UI)?
martianrock is offline   Reply With Quote
Old 05-27-2022, 10:40 AM   #4
martianrock
Junior Member
martianrock began at the beginning.
 
Posts: 9
Karma: 10
Join Date: May 2022
Device: fbreader
Quote:
Originally Posted by martianrock View Post
That's unfortunate, I'd think anonymous users would require more restrictions than authenticated ones. Thanks for confirming it!
Is there by any chance a way to copy library and filter it out by tag in on server side (without calibre UI)?
I guess I can craft something with calibredb list --search filter and calibredb export. or filesystem copy and calibredb list --search followed by calibredb remove. But if there's a better solution, that'd be great to know.
martianrock is offline   Reply With Quote
Old 05-27-2022, 11:43 AM   #5
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,107
Karma: 22669824
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You cant have both anonymous and non-anonymous access. If you want anonymous access, then simply create a special library and expose it. If you want authenticated access then define restirctions per user.
kovidgoyal is offline   Reply With Quote
Old 05-27-2022, 12:21 PM   #6
martianrock
Junior Member
martianrock began at the beginning.
 
Posts: 9
Karma: 10
Join Date: May 2022
Device: fbreader
Quote:
Originally Posted by kovidgoyal View Post
You cant have both anonymous and non-anonymous access. If you want anonymous access, then simply create a special library and expose it. If you want authenticated access then define restirctions per user.
That's what I am trying to achieve by having 2 separate libraries and copying from 'staging' library to 'prod' library with filtering by tags, so that only books with special tag are copied. I want to automate it via cron script or something like that so I'd only have to tag a book as 'ready' in my 'staging' (authenticated) instance on port 8080 and it would (eventually) end up in my anonymous and read-only instance on port 80.
martianrock is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre can't access DB from Standard User, but does from Admin User (Win10) medownunder Library Management 10 06-01-2021 08:54 PM
restrict library and view and changes for anonymous users? badbob001 Server 3 07-23-2020 05:49 AM
Restrict user to virtual library? iamagloworm Server 3 02-03-2020 09:55 PM
Restrict PW Internet-Access with Router-Whitelist reader13498 Kindle Developer's Corner 1 04-14-2015 09:47 AM
iLiad Restrict access to this section? TadW iRex Developer's Corner 8 07-27-2006 05:43 AM


All times are GMT -4. The time now is 05:45 AM.


MobileRead.com is a privately owned, operated and funded community.