perf: 提升服务注册安全性

This commit is contained in:
ibuler
2025-03-27 16:07:57 +08:00
committed by Bryan
parent 9ed822bb3e
commit b55000663e
6 changed files with 52 additions and 9 deletions

View File

@@ -18,7 +18,11 @@ class TerminalSettingSerializer(serializers.Serializer):
('25', '25'),
('50', '50'),
)
SECURITY_SERVICE_ACCOUNT_REGISTRATION = serializers.BooleanField(
SECURITY_SERVICE_ACCOUNT_REGISTRATION = serializers.ChoiceField(
choices=[
('auto', _('Auto(Enabled for the first 5 minutes after startup, then disabled.)')),
(True, _('Enable')), (False, _('Disable'))
],
required=True, label=_('Registration'),
help_text=_(
"Allow component register, after all component setup, you should disable this for security"