only lecturer can join other campus

This commit is contained in:
Aran Zaiger 2015-06-29 17:58:12 +03:00
parent 7cfe2f527d
commit c02926d6b4

View file

@ -118,9 +118,10 @@ def joinCampus(token, campusId):
403 - Invalid token or not a lecturer
"""
if not is_lecturer(token):
return forbidden("Invalid token or not a lecturer!")
user = get_user_by_token(token)
if user is None:
return bad_request("Wrong user Token")
campus = Campus.get_by_id(int(campusId))
if campus is None: