mirror of
https://github.com/wizarrrr/wizarr.git
synced 2026-05-19 03:54:50 -04:00
- 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.
20 lines
627 B
Python
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()],
|
|
)
|