bugfix
This commit is contained in:
parent
a22066dff4
commit
2f983b1e3d
Binary file not shown.
Binary file not shown.
@ -2,6 +2,12 @@ from ahserver.auth_api import AuthAPI
|
|||||||
from ahserver.serverenv import ServerEnv
|
from ahserver.serverenv import ServerEnv
|
||||||
from rbac.check_perm import objcheckperm, get_user_roles, checkUserPassword, register_user, register_auth_method, create_org, create_user
|
from rbac.check_perm import objcheckperm, get_user_roles, checkUserPassword, register_user, register_auth_method, create_org, create_user
|
||||||
from rbac.set_role_perms import set_role_perm, set_role_perms
|
from rbac.set_role_perms import set_role_perm, set_role_perms
|
||||||
|
from rbac.userperm import UserPermisions
|
||||||
|
|
||||||
|
async def get_owner_orgid(sor, orgid):
|
||||||
|
env = ServerEnv()
|
||||||
|
dbname = env.get_module_dbname()
|
||||||
|
return '0'
|
||||||
|
|
||||||
def load_rbac():
|
def load_rbac():
|
||||||
AuthAPI.checkUserPermission = objcheckperm
|
AuthAPI.checkUserPermission = objcheckperm
|
||||||
@ -14,5 +20,6 @@ def load_rbac():
|
|||||||
env.set_role_perm = set_role_perm
|
env.set_role_perm = set_role_perm
|
||||||
env.set_role_perms = set_role_perms
|
env.set_role_perms = set_role_perms
|
||||||
env.register_auth_method = register_auth_method
|
env.register_auth_method = register_auth_method
|
||||||
|
env.get_owner_orgid = get_owner_orgid
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import time
|
import time
|
||||||
from sqlor.dbpools import DBPools
|
from sqlor.dbpools import DBPools
|
||||||
|
from appPublic.Singleton import SingletonDecorator
|
||||||
|
|
||||||
class CacheUP:
|
class CacheUP:
|
||||||
def __init__(self, userid, paths):
|
def __init__(self, userid, paths):
|
||||||
@ -14,7 +15,8 @@ where a.id = c.userid
|
|||||||
def get_paths(self):
|
def get_paths(self):
|
||||||
self.touch_time = time.time()
|
self.touch_time = time.time()
|
||||||
return self.paths
|
return self.paths
|
||||||
|
|
||||||
|
@SingletonDecorator
|
||||||
class UserPermisions:
|
class UserPermisions:
|
||||||
def __init__(self, max_cache_user=10000):
|
def __init__(self, max_cache_user=10000):
|
||||||
self.max_cache_user = max_cache_user
|
self.max_cache_user = max_cache_user
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user