Browse Source

버그 수정

2DU 8 years ago
parent
commit
d2c7efdf74
1 changed files with 21 additions and 6 deletions
  1. 21 6
      func.py

+ 21 - 6
func.py

@@ -196,14 +196,29 @@ def acl_check(name):
 
     curs.execute('select data from other where name = "edit"')
     set_d = curs.fetchall()
-    if(acl_d[0][0] == 'user' or set_d[0][0] == 'login' and not user_d):
-        return(1)
+    if(acl_d[0][0] == 'user'):
+        if(not user_d):
+            return(1)
 
-    if(acl_d[0][0] == 'admin' and not user_d or not admin_check(5, 'edit (' + name + ')') == 1):
-        return(1)
+    if(acl_d[0][0] == 'admin'):
+        if(not user_d):
+            return(1)
 
-    if(set_d[0][0] == 'admin' and not user_d or not admin_check(5, None) == 1):
-        return(1)
+        if(not admin_check(5, 'edit (' + name + ')') == 1):
+            return(1)
+
+    if(set_d):
+        print(set_d[0][0])
+        if(set_d[0][0] == 'user'):
+            if(not user_d):
+                return(1)
+
+        if(set_d[0][0] == 'admin'):
+            if(not user_d):
+                return(1)
+
+            if(not admin_check(5, None) == 1):
+                return(1)
 
     return(0)