not only lecturer can write msgs

This commit is contained in:
Aran Zaiger 2015-08-02 21:41:54 +03:00
parent e475585e76
commit da333764b6

View file

@ -68,8 +68,8 @@ def createMessage(token):
""" """
if not request.data: if not request.data:
return bad_request("no data") return bad_request("no data")
if not is_lecturer(token): #todo: change to lecturer id # if not is_lecturer(token): #todo: change to lecturer id
return forbidden("Invalid token or not a lecturer!") # return forbidden("Invalid token or not a lecturer!")
user = get_user_by_token(token) user = get_user_by_token(token)