Commit 2f35e106 authored by Daniel W Bond's avatar Daniel W Bond

RAs and RDs may not delete their accounts-- link removed, redirected to...

RAs and RDs may not delete their accounts-- link removed, redirected to settings with msg to email us
parent 04d830b6
......@@ -226,9 +226,11 @@
{% endspaceless %}
</div>
</div>
{% if not request.user.student.is_staff %}
<p>
<small><a href="{% url 'delete_student' request.user.username %}">Delete Account</a></small>
</p>
{% endif %}
</div>
{% include 'social/social_media_settings.html' %}
......
......@@ -293,7 +293,15 @@ class DeleteStudent(FormView):
except ObjectDoesNotExist:
raise Http404
if not(url_uname == self.request.user.username):
if student.is_staff():
staff_msg = """To delete your account, contact us if you are no longer a
Resident Advisor or Director at
<a href="mailto:roomlist@lists.srct.gmu.edu">
roomlist@lists.srct.gmu.edu</a>."""
messages.add_message(self.request, messages.ERROR, mark_safe(staff_msg))
return HttpResponseRedirect(reverse('update_student',
kwargs={'slug': self.request.user.username}))
elif not(url_uname == self.request.user.username):
return HttpResponseRedirect(reverse('delete_student',
kwargs={'slug': self.request.user.username}))
else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment