-
Notifications
You must be signed in to change notification settings - Fork 6
Removed reliance on pelicanq fork of fastapi-users #525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -5,6 +5,7 @@ | |||||
| from database import DB_dependency, get_db | ||||||
| from db_models.permission_model import Permission_DB | ||||||
| from db_models.post_model import Post_DB | ||||||
| from db_models.user_model import User_DB | ||||||
| from api_schemas.permission_schemas import ( | ||||||
| PermissionCreate, | ||||||
| PermissionRead, | ||||||
|
|
@@ -31,6 +32,21 @@ def get_all_permissions(db: Annotated[Session, Depends(get_db)]): | |||||
| return res | ||||||
|
|
||||||
|
|
||||||
| @permission_router.get("/me", response_model=list[tuple[str, str]] | None) | ||||||
| def get_my_permissions(member: Annotated[User_DB | None, Permission.check_member()]): | ||||||
|
||||||
| def get_my_permissions(member: Annotated[User_DB | None, Permission.check_member()]): | |
| def get_my_permissions(member: Annotated[User_DB | bool | None, Permission.check_member()]): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SQLAlchemyBaseUserTableis imported fromfastapi_users.db, but with the dependency split (fastapi-users-db-sqlalchemyis pinned in requirements) the SQLAlchemy base table class is usually provided byfastapi_users_db_sqlalchemy. Iffastapi_usersdoesn’t re-export this symbol, this will break at import time; consider importing fromfastapi_users_db_sqlalchemyfor compatibility with the pinned packages.