eduNEXT / tutor-contrib-edunext-distro

A tool to facilitate the customization of an Openedx instance, adding commands and settings to have an easy-to-use and a ready-to-deploy in local or in development openedx distribution.
2 stars 1 forks source link

[BUG] Missing middlewares #9

Closed MoisesGSalas closed 2 years ago

MoisesGSalas commented 2 years ago

Describe the bug Some plugins (i.e. eox-core, eox-tenant) provide extra functionality through the use of middlewares. Currently there is no way to include them in the configuration besides manually altering the files.

To Reproduce Steps to reproduce the behavior:

  1. Replace django.contrib.sites.middleware.CurrentSiteMiddleware with eox_tenant.middleware.CurrentSiteMiddleware in your settings.
  2. Add MicrositeCrossBrandingFilterMiddleware to the middleware list.
  3. try accessing "/courses/course-v1:org1+Course+Run/course" from a tenant that doesn't have org1 in their course_org_filter (org1 must be in the course_org_filter of another tenant), you should be able to access the course content.

Expected behavior

Accessing a course from a different org than the ones defined in course_org_filter from the tenant should throw a 404 page.

Additional context This example is only for the CurrentSiteMiddleware, there are other middlewares in both plugins That provide extra functionality. I think they should be toggleable so the user can decide if they want to use X middleware.

Alec4r commented 2 years ago

@MoisesGSalas thanks for your report, this has been solved on the PR #11