Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DSAR admin page #1602

Merged
merged 5 commits into from
Dec 30, 2024
Merged

Add DSAR admin page #1602

merged 5 commits into from
Dec 30, 2024

Conversation

robhudson
Copy link
Contributor

@robhudson robhudson commented Dec 24, 2024

This adds a DSAR page to the admin.

Step 1: Empty page
dsar-1

Step 2: Enter emails
dsar-2

Step 3: Output (with copy button)
dsar-3

@robhudson robhudson requested a review from pmac December 24, 2024 23:16
)


@staff_member_required
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm thinking it might be nice to also make this require certain permissions so not everyone with a Basket login sees this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the DSAR user permission and group to the 2nd commit on this PR.

Copy link
Member

@pmac pmac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple comments you can take or leave. Thanks for knocking this out!

@@ -0,0 +1,6 @@
from django.contrib import admin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this file and the apps.py work here, but I thought they went in app folders like base where the rest of the stuff in the PR went. No?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's here b/c I defined it to be here based on the basket/apps.py file pointing to this. It seemed like a good general place to put it that isn't app specific.

return []

emails = []
for email in [v.strip() for v in value.split("\n")]:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it'd be safer to use value.splitlines(), though using split("\n") and strip() is probably roughly equivalent.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't strip() but it probably supports other line boundaries, so I'll switch to splitlines(). 👍

@robhudson
Copy link
Contributor Author

Updated to add forms and view tests, and review fixes.

@robhudson robhudson merged commit f8533b7 into main Dec 30, 2024
1 check passed
@robhudson robhudson deleted the dsar-admin branch December 30, 2024 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants