Beispiel #1
0
 def markUnread(self, id):
     loggedInUser = helper.getLoggedInUser()
     theMessage = Message.read(id, userId=loggedInUser)
     if theMessage != None:
         theMessage.markRead(False)
         return data(Message.read(id, loggedInUser))
     else:
         return error("Operation not permitted. You don't have permission to mark that message", PermissionError)
Beispiel #2
0
 def markUnread(self, id):
     loggedInUser = helper.getLoggedInUser()
     theMessage = Message.read(id, userId=loggedInUser)
     if theMessage != None:
         theMessage.markRead(False)
         return data(Message.read(id, loggedInUser))
     else:
         return error("Operation not permitted. You don't have permission to mark that message", PermissionError)
Beispiel #3
0
 def read(self, id):
     from server.models.ssuser import SSUser
     theMessage = Message.read(id, loggedInUser)
     if theMessage and theMessage.toId == loggedInUser:
         return data(theMessage)
     else:
         return error("Operation not permitted. You don't have permission to read this message.", PermissionError)
Beispiel #4
0
 def read(self, id):
     from server.models.ssuser import SSUser
     theMessage = Message.read(id, loggedInUser)
     if theMessage and theMessage.toId == loggedInUser:
         return data(theMessage)
     else:
         return error("Operation not permitted. You don't have permission to read this message.", PermissionError)