Files
wizarr/app/forms/general.py
Matthieu B f295a345a1 feat: add user disable functionality and update user management settings
- Introduced `is_disabled` attribute to the User model.
- Added `expiry_action` selection in the GeneralSettingsForm for user management.
- Implemented `disable_user` methods for various media clients (Audiobookshelf, Jellyfin, Kavita, etc.) to handle user disabling.
- Updated `check_expiring` task to process expired users based on the new settings.
- Enhanced user interface to reflect disabled status in user cards.
- Added migration for the new `is_disabled` column in the user table.
2025-09-27 12:19:48 +02:00

20 lines
627 B
Python

from flask_wtf import FlaskForm
from wtforms import BooleanField, SelectField, StringField
from wtforms.validators import DataRequired, Optional
class GeneralSettingsForm(FlaskForm):
server_name = StringField("Display Name", validators=[DataRequired()])
wizard_acl_enabled = BooleanField(
"Protect Wizard Access", default=True, validators=[Optional()]
)
expiry_action = SelectField(
"Expiry Action",
choices=[
("delete", "Delete User"),
("disable", "Disable User (if supported)"),
],
default="delete",
validators=[DataRequired()],
)