-
-
Notifications
You must be signed in to change notification settings - Fork 775
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
GDPR: Fixes https://github.com/gitcoinco/web/issues/1243 #1246
Conversation
app/marketing/views.py
Outdated
logout_redirect = redirect(reverse('logout') + "?next=/") | ||
return logout_redirect | ||
else: | ||
msg = "Error: did not understand your request" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
F841 local variable 'msg' is assigned to but never used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to set msg
to response['output']
and wrap this in gettext_lazy ?
app/marketing/views.py
Outdated
msg = "Error: did not understand your request" | ||
|
||
|
||
context = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E303 too many blank lines (2)
app/retail/views.py
Outdated
@@ -16,6 +16,7 @@ | |||
along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
|
|||
''' | |||
from django.contrib import messages |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
F401 'django.contrib.messages' imported but unused
Codecov Report
@@ Coverage Diff @@
## master #1246 +/- ##
==========================================
- Coverage 31.59% 31.53% -0.07%
==========================================
Files 118 118
Lines 8168 8192 +24
Branches 1065 1069 +4
==========================================
+ Hits 2581 2583 +2
- Misses 5477 5499 +22
Partials 110 110
Continue to review full report at Codecov.
|
@@ -14,7 +14,7 @@ | |||
You should have received a copy of the GNU Affero General Public License | |||
along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
{% endcomment %} | |||
<script> | |||
<script id="messages"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does this change do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few minor comments - I'll tackle these, unless there are objections to my comments.
app/dashboard/models.py
Outdated
@@ -908,7 +913,7 @@ class Profile(SuperModel): | |||
|
|||
""" | |||
|
|||
user = models.OneToOneField(User, on_delete=models.CASCADE, null=True, blank=True) | |||
user = models.OneToOneField(User, on_delete=models.SET(get_sentinel_user), null=True, blank=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we just set this to: on_delete=models.SET_NULL
- deleted
user can only have one associated profile.
app/marketing/views.py
Outdated
@@ -66,8 +67,11 @@ def get_settings_navs(request): | |||
'body': 'Slack', | |||
'href': reverse('slack_settings'), | |||
}, { | |||
'body': f"{subdomain}{settings.ENS_TLD}", | |||
'body': f"ENS", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might as well eliminate the f
here.
app/marketing/views.py
Outdated
'href': reverse('ens_settings'), | ||
}, { | ||
'body': f"Account", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same
app/marketing/views.py
Outdated
logout_redirect = redirect(reverse('logout') + "?next=/") | ||
return logout_redirect | ||
else: | ||
msg = "Error: did not understand your request" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to set msg
to response['output']
and wrap this in gettext_lazy ?
<script> | ||
$("document").ready(function(){ | ||
$("#delete").submit(function(e){ | ||
var _continue = confirm('Are you sure you want to delete all of your data from Gitcoin?'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we wrap this in trans
?
app/marketing/views.py
Outdated
profile.hide_profile = True | ||
profile.save() | ||
request.user.delete() | ||
messages.success(request, _(f'Your account has been deleted')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can eliminate the f
string here and above.
app/marketing/views.py
Outdated
logout_redirect = redirect(reverse('logout') + "?next=/") | ||
return logout_redirect | ||
else: | ||
msg = "Error: did not understand your request" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
F841 local variable 'msg' is assigned to but never used
app/dashboard/models.py
Outdated
@@ -52,6 +53,10 @@ | |||
logger = logging.getLogger(__name__) | |||
|
|||
|
|||
def get_sentinel_user(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can remove this function if we are using SET_NULL. @mbeacom
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
app/dashboard/models.py
Outdated
@@ -23,6 +23,7 @@ | |||
from urllib.parse import urlsplit | |||
|
|||
from django.conf import settings | |||
from django.contrib.auth import get_user_model |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
F401 'django.contrib.auth.get_user_model' imported but unused
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
Delete account ability in settings
Checklist
Affected core subsystem(s)
settings
Testing
tested it
Refers/Fixes
#1243