mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-02-10 01:43:11 -05:00
fix: Limit shopping list owners to current group (#3305)
* add route for getting group-only users * add new api route to frontend * update shopping list user getAll call * tests * fixed bad import * replace UserOut with UserSummary * fix params
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# This file is auto-generated by gen_schema_exports.py
|
||||
from .auth import Token, TokenData, UnlockResults
|
||||
from .auth import CredentialsRequest, CredentialsRequestForm, OIDCRequest, Token, TokenData, UnlockResults
|
||||
from .registration import CreateUserRegistration
|
||||
from .user import (
|
||||
ChangePassword,
|
||||
@@ -18,6 +18,7 @@ from .user import (
|
||||
UserIn,
|
||||
UserOut,
|
||||
UserPagination,
|
||||
UserSummary,
|
||||
)
|
||||
from .user_passwords import (
|
||||
ForgotPassword,
|
||||
@@ -30,6 +31,9 @@ from .user_passwords import (
|
||||
|
||||
__all__ = [
|
||||
"CreateUserRegistration",
|
||||
"CredentialsRequest",
|
||||
"CredentialsRequestForm",
|
||||
"OIDCRequest",
|
||||
"Token",
|
||||
"TokenData",
|
||||
"UnlockResults",
|
||||
@@ -55,4 +59,5 @@ __all__ = [
|
||||
"UserIn",
|
||||
"UserOut",
|
||||
"UserPagination",
|
||||
"UserSummary",
|
||||
]
|
||||
|
||||
@@ -139,10 +139,20 @@ class UserOut(UserBase):
|
||||
return slugs
|
||||
|
||||
|
||||
class UserSummary(MealieModel):
|
||||
id: UUID4
|
||||
full_name: str
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
|
||||
|
||||
class UserPagination(PaginationBase):
|
||||
items: list[UserOut]
|
||||
|
||||
|
||||
class UserSummaryPagination(PaginationBase):
|
||||
items: list[UserSummary]
|
||||
|
||||
|
||||
class UserFavorites(UserBase):
|
||||
favorite_recipes: list[RecipeSummary] = [] # type: ignore
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
|
||||
Reference in New Issue
Block a user