When I try to limit a user to only one virtual library, when they attempt to access the content-server they get a 403 error "The user guest is not allowed to access any libraries on this server".
But if I allow them access to all virtual libraries, they access the content server just fine, and can manually choose the same virtual library that I was initially trying to limit them to.
I did find something suspicious when configuring the user. When I restricted them to only one VL, I typed the library name as "Novels". Note the initial capital letter. But when I later confirmed through the content server what libraries were set, it displayed "novels" (lower case initial letter). Is this a possible bug in letter-case handling? Or something else I'm doing wrong?
Code:
[calibre@rpi3b user]$ systemctl --user stop calibre-server
[calibre@rpi3b user]$ calibre-server --userdb /srv/calibre/users-sqlite --manage-users
1) Add a new user
2) Edit an existing user
3) Remove a user
4) Cancel
What do you want to do? [1-4]: 2
Existing user names:
guest
Enter the username: guest
guest has readonly access
1) Show password for guest
2) Change password for guest
3) Change read/write permission for guest
4) Change the libraries guest is allowed to access
5) Cancel
What do you want to do? [1-5]: 4
{} has the no additional per-library restrictions
1) Allow access to all libraries
2) Allow access to only specified libraries
3) Allow access to all, except specified libraries
4) Change per-library restrictions
5) Cancel
What do you want to do? [1-5]: 2
Enter a comma separated list of library names: Novels
Allowing access only to libraries: Novels
guest has readonly access
1) Show password for guest
2) Change password for guest
3) Change read/write permission for guest
4) Change the libraries guest is allowed to access
5) Cancel
What do you want to do? [1-5]: 4
guest is currently only allowed to access the libraries named: novels
{} has the no additional per-library restrictions
1) Allow access to all libraries
2) Allow access to only specified libraries
3) Allow access to all, except specified libraries
4) Change per-library restrictions
5) Cancel
What do you want to do? [1-5]: 5
1) Add a new user
2) Edit an existing user
3) Remove a user
4) Cancel
What do you want to do? [1-4]: 4
[calibre@rpi3b user]$ systemctl --user start calibre-server
Here is the Calibre unit file:
Code:
[Unit]
Description=Calibre content server
After=network.target
[Service]
Type=simple
ExecStart=/usr/bin/calibre-server --url-prefix /calibre --num-per-page=999 --port 8080 --userdb /srv/calibre/users-sqlite --enable-auth /var/opt/calibre
[Install]
WantedBy=multi-user.target