SciCatProject / backend-v3

SciCat Data Catalogue Backend
https://scicatproject.github.io/documentation/
BSD 3-Clause "New" or "Revised" License
13 stars 17 forks source link

Append hardcoded email when user has no email #696

Closed minottic closed 1 year ago

minottic commented 1 year ago

Description

This PR should close #694 by appending a predefined email when user hasn't one in its profile. Even though a more elegant solution would have been nice, this is pretty fast and allows not to change many tests that would otherwise break with the better solution. This solution is to re-evaluate if the migration to the new be takes longer than expected

Motivation

Having no email had the unwanted effect of allowing such a user to see all datasets

Fixes:

Tests included/Docs Updated?

minottic commented 1 year ago

@J-avery32 please check this fast fix. I appreciate it's not the best, but it spared us from fixing all the otherwise failing tests, given that the plan is to move to the new be

J-avery32 commented 1 year ago

I think this should be a quick fix to all the problems I laid out in the original PR. However, not very robust as we are not double checking in all different places of the code for the possible weird behaviors. So a similar bug could be introduced easily without it being obvious or caught by any tests.

minottic commented 1 year ago

I agree. And I think this makes sense for now, only because the plan is to move to the new be in the short term, but if that will take longer, we should review this change again