Skip to content

Challenge creation checks only host team membership, not status or permissions #4859

@kanankotwani28

Description

@kanankotwani28

Hi maintainers,

I noticed that challenge creation currently checks only host team membership,
not host status or permissions.
While tracing this flow, I also observed that the host team listing endpoint
returns all teams associated with a user without filtering by status or
permissions. Because of this, it seems possible for a user with a non-ACCEPTED
status or non-ADMIN/WRITE permission to access a host team ID and pass the
membership check.
Is this behavior intentional, or should permission checks (e.g. status=ACCEPTED
and permissions in [ADMIN, WRITE]) be enforced at the API level? I might be
missing some context, but happy to work on this if a backend-side check is
desired.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions