mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-11-21 11:22:36 -05:00
feat: prevent all changes to the default user in demo (#2470)
This commit is contained in:
@@ -113,6 +113,10 @@ class UserOut(UserBase):
|
||||
|
||||
getter_dict = UserGetterDict
|
||||
|
||||
@property
|
||||
def is_default_user(self) -> bool:
|
||||
return self.email == settings.DEFAULT_EMAIL.strip().lower()
|
||||
|
||||
@classmethod
|
||||
def loader_options(cls) -> list[LoaderOption]:
|
||||
return [joinedload(User.group), joinedload(User.favorite_recipes), joinedload(User.tokens)]
|
||||
|
||||
Reference in New Issue
Block a user