f-klubben / stregsystemet

The very public stregsystem repo
Other
38 stars 49 forks source link

Feature: Mail/download userdata #434

Closed Mast3rwaf1z closed 5 months ago

Mast3rwaf1z commented 5 months ago

The idea is to allow users to download all their user data, either locally or over email

To avoid people downloading to strandvejen i should probably also add some way to hide the download button there, or omit it all together...

Mast3rwaf1z commented 5 months ago

@krestenlaust i think this is a working version, but i have no way of testing whether the mails are being sent properly, do you have an idea?

krestenlaust commented 5 months ago

I think I'll try to do a review just now, and then we can find a way to test it afterwards. But haven't you been able to set up a local mailserver before?

Mast3rwaf1z commented 5 months ago

i'll see if i can find something to test with, but the main problem is whether i'd be spamming anything, so i figured i'd ask if you used something to test mails from stregsystemet

Mast3rwaf1z commented 5 months ago

https://github.com/mailhog/MailHog seems good enough, i'll test it some more before putting it ready for review

krestenlaust commented 5 months ago

https://github.com/mailhog/MailHog seems good enough, i'll test it some more before putting it ready for review

No worries, I'll make sure to review again when you're ready 👌

Mast3rwaf1z commented 5 months ago

it works using mailhog --smtp-bind-addr 0.0.0.0:25, but i'd like to have a new column in the member table called like last_data_request but adding it to the member object in models.py doesn't work, how do i go about adding a column?

codecov[bot] commented 5 months ago

Codecov Report

Attention: Patch coverage is 80.85106% with 9 lines in your changes are missing coverage. Please review.

Project coverage is 53.49%. Comparing base (bd2ba65) to head (313a363).

Files Patch % Lines
stregsystem/mail.py 77.77% 5 Missing and 1 partial :warning:
stregsystem/views.py 76.92% 3 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## next #434 +/- ## =========================================== - Coverage 80.80% 53.49% -27.31% =========================================== Files 33 33 Lines 3000 4621 +1621 Branches 247 274 +27 =========================================== + Hits 2424 2472 +48 - Misses 538 2097 +1559 - Partials 38 52 +14 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Mast3rwaf1z commented 5 months ago

just quickly went over your review in my lunch break :)

could you please take a look at the two comments i haven't closed further up? @krestenlaust

BoAnd commented 5 months ago

LGTM

krestenlaust commented 5 months ago

@Mast3rwaf1z you may merge whenever :D If you at some point in the future feel like doing more on this feature, then adding more tests would be cool