Trim whitespace when adding course authors.

This commit is contained in:
Peter Fogg
2013-07-22 10:34:23 -04:00
parent f780369afa
commit 060b2e17e5

View File

@@ -83,6 +83,9 @@ def add_user(request, location):
}
return JsonResponse(msg, 400)
# remove leading/trailing whitespace if necessary
email = email.strip()
# check that logged in user has admin permissions to this course
if not has_access(request.user, location, role=INSTRUCTOR_ROLE_NAME):
raise PermissionDenied()