mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Dont allow GUI prefs to override userdb
This commit is contained in:
parent
b0e2cb8452
commit
0fab2c603e
@ -71,6 +71,7 @@ class Float(QDoubleSpinBox):
|
||||
def __init__(self, name, layout):
|
||||
QDoubleSpinBox.__init__(self)
|
||||
self.setRange(0, 10000)
|
||||
self.setDecimals(1)
|
||||
opt = options[name]
|
||||
self.valueChanged.connect(self.changed_signal.emit)
|
||||
init_opt(self, opt, layout)
|
||||
@ -133,7 +134,7 @@ class AdvancedTab(QWidget):
|
||||
self.widgets = []
|
||||
self.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed)
|
||||
for name in sorted(options, key=lambda n:options[n].shortdoc.lower()):
|
||||
if name in ('auth', 'port', 'allow_socket_preallocation'):
|
||||
if name in ('auth', 'port', 'allow_socket_preallocation', 'userdb'):
|
||||
continue
|
||||
opt = options[name]
|
||||
if opt.choices:
|
||||
@ -387,7 +388,7 @@ class ConfigWidget(ConfigWidgetBase):
|
||||
settings.update(getattr(tab, 'settings', {}))
|
||||
if settings['auth']:
|
||||
from calibre.srv.users import UserManager
|
||||
if not UserManager(settings['userdb']).all_user_names:
|
||||
if not UserManager().all_user_names:
|
||||
error_dialog(self, _('No users specified'), _(
|
||||
'You have turned on the setting to require passwords to access'
|
||||
' the content server, but you have not created any user accounts.'
|
||||
|
@ -148,7 +148,7 @@ raw_options = (
|
||||
_('Comma separated list of user-defined metadata fields that will not be displayed'
|
||||
' by the content server in the /opds and /mobile views.'),
|
||||
|
||||
_('Only display user-defined fields'),
|
||||
_('Restrict displayed user-defined fields'),
|
||||
'displayed_fields', None,
|
||||
_('Comma separated list of user-defined metadata fields that will be displayed'
|
||||
' by the content server in the /opds and /mobile views. If you specify this'
|
||||
|
Loading…
x
Reference in New Issue
Block a user