Browse Source

Revert "Testing for bug fixing"

This reverts commit 6f7728141034354afd9c944008f97e70426e7982.
root 4 years ago
parent
commit
302f6632ce
1 changed files with 3 additions and 6 deletions
  1. 3 6
      lcmlog-server

+ 3 - 6
lcmlog-server

@@ -258,10 +258,8 @@ def auth(user_id, method, kind):
 	# Check if user id is in auth files
 	# We suppose that every authorized user is ONLY IN A FILE!
 	user_type = ""
-	print("prefor")
-        for file_name in ["150","Admin","Valhalla","Nirvana"]:
-		print("prewith")
-                with open(DIR + "/auth/" + file_name) as f:
+	for file_name in ["150","Admin","Valhalla","Nirvana"]:
+		with open(DIR + "/auth/" + file_name) as f:
 			for line in f:
 				line = line.split()[0]
 				if int(line) == user_id:
@@ -274,8 +272,7 @@ def auth(user_id, method, kind):
 		# If not in auth files, the user cannot do anything
 		raise AuthError()
 	# Now we check the user type permissions
-	print("pretoml")
-        auth_list = toml.load(DIR + "/auth/auth.toml")[user_type]["auth"]
+	auth_list = toml.load(DIR + "/auth/auth.toml")[user_type]["auth"]
 	if not method + " " + kind in auth_list:
 		raise AuthError()
 	return