diff --git a/TempLate/GERP/index.html b/TempLate/GERP/index.html index 3f25fec5..76109c7c 100644 --- a/TempLate/GERP/index.html +++ b/TempLate/GERP/index.html @@ -5,7 +5,7 @@ GERP 管理系统 - + @@ -14,7 +14,7 @@ - +
diff --git a/gvsds/apps/gerp/views/menu.py b/gvsds/apps/gerp/views/menu.py index 3b186ea5..537d7c87 100644 --- a/gvsds/apps/gerp/views/menu.py +++ b/gvsds/apps/gerp/views/menu.py @@ -145,18 +145,19 @@ class MenuListCompatView(ELTAuthenticatedAPIView): except Exception: logger.exception('MenuListCompatView 权限校验异常 uuid=%s', uuid_str) no_perm_uuids.add(uuid_str) - # 收集所有无权限节点的子孙节点 - def _CollectDescendants(parent_uuid, acc): - for uid, item in menu_map.items(): - if item['ParentUUID'] == parent_uuid and uid not in acc: - acc.add(uid) - _CollectDescendants(uid, acc) - expanded = set() - for uuid_str in no_perm_uuids: - _CollectDescendants(uuid_str, expanded) - no_perm_uuids |= expanded - for uuid_str in no_perm_uuids: - menu_map.pop(uuid_str, None) + + # 收集所有无权限节点的子孙节点 + def _CollectDescendants(parent_uuid, acc): + for uid, item in menu_map.items(): + if item['ParentUUID'] == parent_uuid and uid not in acc: + acc.add(uid) + _CollectDescendants(uid, acc) + expanded = set() + for uuid_str in no_perm_uuids: + _CollectDescendants(uuid_str, expanded) + no_perm_uuids |= expanded + for uuid_str in no_perm_uuids: + menu_map.pop(uuid_str, None) # 应用/功能菜单过滤(仅普通用户):企业功能按租户安装状态、个人应用按个人启用状态 # 管理员(admin:super/tenant)跳过过滤——管理视角需全览,便于在应用中心管理