Gradebook Cohort Filter is Disabled

We noticed that in sumac.3 that the Gradebook filter for Student Groups > Cohorts is disabled even though we granted Staff or Admin roles to the course user. See picture for details about the cohort drop-down being grayed out.

The platform code at edx-platform/openedx/core/djangoapps/course_groups/views.py at open-release/sumac.3 · openedx/edx-platform · GitHub has a mixin for APIPermissions which checks permissions with IsStaffOrAdmin at edx-platform/openedx/core/djangoapps/course_groups/views.py at open-release/sumac.3 · openedx/edx-platform · GitHub .

The IsStaffOrAdmin class edx-platform/openedx/core/djangoapps/course_groups/permissions.py at open-release/sumac.3 · openedx/edx-platform · GitHub checks discussion forum roles only and does not check course Staff or Admin roles for accessing this endpoint at LMS/api/cohorts/v1/courses/course-v1:CapeCodCC+FAA-ACS-AM-IG-CCC+2025_2026/cohorts/.

This LMS endpoint for cohorts returns a 403 Forbidden response with this message.

{
    "developer_message": "You do not have permission to perform this action."
}

Do you have to be a Discussion Admin or have other discussion roles to have this Cohort Filter not disabled?

cc @braden @dave @Felipe @e0d @AbdurRahman

Hi @Zachary_Trabookis - it looks like this file was last edited 3 years ago in fix: discussion moderators can't create posts for specific cohorts by abdurrahman-asad · Pull Request #30352 · openedx/edx-platform · GitHub

Do you have to be a Discussion Admin or have other discussion roles to have this Cohort Filter not disabled?

Have you been able to test this? That is, make different users with different levels of permissions and see who can access what?

@sarina
I made Admin and Staff roles, and those accounts were not able to see the Cohort filtering until I added them to the Discussion Admin role.

So it seems the answer to your question (Do you have to be a Discussion Admin or have other discussion roles to have this Cohort Filter not disabled?) is Yes?

If you think that’s a bug, I’d file an issue on the repo!

@sarina Yeah, I wasn’t sure if this was a bug or by design.

I think I would classify this as a bug, with the fix being that the cohorts endpoint should check if someone is staff or admin (not discussions staff or admin). I don’t think the IsStaffOrAdmin class itself should change because not sure what downstream effects it would have. Does that make sense?

1 Like