|
|
@ -6,7 +6,7 @@
|
|
|
|
import sys
|
|
|
|
import sys
|
|
|
|
sys.path.append('.')
|
|
|
|
sys.path.append('.')
|
|
|
|
|
|
|
|
|
|
|
|
from sqlalchemy import or_
|
|
|
|
from sqlalchemy import and_, or_
|
|
|
|
from db_logic.module import BllModule
|
|
|
|
from db_logic.module import BllModule
|
|
|
|
from db_logic.role import BllRole
|
|
|
|
from db_logic.role import BllRole
|
|
|
|
from Common.auth import token_auth
|
|
|
|
from Common.auth import token_auth
|
|
|
@ -51,7 +51,11 @@ def add_user_power_list():
|
|
|
|
"5": instrument_modulet if instrument_modulet else [],
|
|
|
|
"5": instrument_modulet if instrument_modulet else [],
|
|
|
|
}
|
|
|
|
}
|
|
|
|
# 删除除去柜子权限外的所有权限
|
|
|
|
# 删除除去柜子权限外的所有权限
|
|
|
|
BllModuleRelation().delete(EntityModuleRelation.object_id == user_id, EntityModuleRelation.module_type != "1")
|
|
|
|
BllModuleRelation().delete(
|
|
|
|
|
|
|
|
and_(EntityModuleRelation.object_id == user_id,
|
|
|
|
|
|
|
|
EntityModuleRelation.module_type != "1",
|
|
|
|
|
|
|
|
EntityModuleRelation.object_type != "1")
|
|
|
|
|
|
|
|
)
|
|
|
|
inster_module_list = []
|
|
|
|
inster_module_list = []
|
|
|
|
for k,v in inster_dic.items():
|
|
|
|
for k,v in inster_dic.items():
|
|
|
|
for i in v:
|
|
|
|
for i in v:
|
|
|
|