示例#1
0
 def update_user(self, userid, usertype):
     # Check if the user is an admin
     if cherrypy.session.get("usertype", "user") == "admin":
         return API.update_user(userid, usertype)
     else:
         return json.dumps({"error": "User not authorized for this request"})