Merge pull request #469 from edx/peter-fogg/fix-stud-486
Trim whitespace when adding course authors.
This commit is contained in:
@@ -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()
|
||||||
|
|||||||
Reference in New Issue
Block a user