Ensure admin is default role (#17044)

This commit is contained in:
Josh Hawkins 2025-03-09 22:59:07 -05:00 committed by GitHub
parent 1e0295fad5
commit 9f9117c318
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View File

@ -600,6 +600,7 @@ class FrigateApp:
User.insert(
{
User.username: "admin",
User.role: "admin",
User.password_hash: password_hash,
User.notification_tokens: [],
}

View File

@ -119,7 +119,7 @@ class User(Model): # type: ignore[misc]
username = CharField(null=False, primary_key=True, max_length=30)
role = CharField(
max_length=20,
default="viewer",
default="admin",
)
password_hash = CharField(null=False, max_length=120)
notification_tokens = JSONField()