Commit 060b2e17 by Peter Fogg

Trim whitespace when adding course authors.

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