|
@@ -196,14 +196,29 @@ def acl_check(name):
|
|
|
|
|
|
|
|
curs.execute('select data from other where name = "edit"')
|
|
curs.execute('select data from other where name = "edit"')
|
|
|
set_d = curs.fetchall()
|
|
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)
|
|
return(0)
|
|
|
|
|
|