Skip to content
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

Allow all users to get groups #307

Merged
merged 1 commit into from
Dec 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions app/endpoints/groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@
from sqlalchemy.ext.asyncio import AsyncSession

from app.cruds import cruds_groups, cruds_users
from app.dependencies import get_db, get_request_id, is_user_a_member_of
from app.dependencies import (
get_db,
get_request_id,
is_user_a_member,
is_user_a_member_of,
)
from app.models import models_core
from app.schemas import schemas_core
from app.utils.types.groups_type import GroupType
Expand All @@ -34,7 +39,7 @@
)
async def read_groups(
db: AsyncSession = Depends(get_db),
user=Depends(is_user_a_member_of(GroupType.admin)),
user=Depends(is_user_a_member),
):
"""
Return all groups from database as a list of dictionaries
Expand Down