eduNEXT / eox-tenant

Plugin for managing multiple tenants (organizations) within a single Open edX instance.
GNU Affero General Public License v3.0
7 stars 4 forks source link

refactor: inherit from social auth exception #192

Closed johanseto closed 10 months ago

johanseto commented 11 months ago

Description

This changes the inheritance of the eox-tenant-auth-exception.

This is with the purpose of the exception to be handled by the social tpa middleware exception process. This is to avoid this 502 error msg: image image

You can see here that the new inheritance class is also based on value error exception.

But the change is related to this eox-core PR:

So now the exception is family of the SocialAuthBaseException.

With that change now, the social_django middleware could manage it.

Keep in mind that this middleware is the parent of edx-platform middleware.

The middleware seems applied in the openedx tpa module.

Checklist for Merge

johanseto commented 11 months ago

@andrey-canon For the test failing I made this PR to eox-tenant. But yes I can added also to this branch in other PR. https://github.com/eduNEXT/eox-tenant/pull/193

johanseto commented 11 months ago

@andrey-canon for the inclusion of the requirements. I avoid it because I want this PR to have the lowest lines and lowest impact. Also, I want this to be moved to master, so then I would have a requirements incompatibility due to the large update... Also some other eox`s like core have block code like that: https://github.com/eduNEXT/eox-core/blob/master/eox_core/middleware.py#L31-L37 Also this eox: https://github.com/eduNEXT/eox-tenant/blob/master/setup.py#L7-L10

andrey-canon commented 11 months ago

@andrey-canon for the inclusion of the requirements. I avoid it because I want this PR to have the lowest lines and lowest impact. Also, I want this to be moved to master, so then I would have a requirements incompatibility due to the large update... Also some other eox`s like core have block code like that: https://github.com/eduNEXT/eox-core/blob/master/eox_core/middleware.py#L31-L37 Also this eox: https://github.com/eduNEXT/eox-tenant/blob/master/setup.py#L7-L10

in the past this was consider as the lazy way to pass the test if you are worried about the number of lines my suggestion is to do make upgrade and then discard all the changes that are not related with the social-core dependency

johanseto commented 11 months ago

in the past this was consider as the lazy way to pass the test if you are worried about the number of lines my suggestion is to do make upgrade and then discard all the changes that are not related with the social-core dependency

4961cef

johanseto commented 10 months ago

@andrey-canon I have added the dependency. b306762

andrey-canon commented 10 months ago

@johanseto could you open the PR against master, please

johanseto commented 10 months ago

PR opened against master https://github.com/eduNEXT/eox-tenant/pull/195