diff --git a/docs/AddUserAsset.py b/docs/AddUserAsset.py index f8faea53a..6c9a00e70 100644 --- a/docs/AddUserAsset.py +++ b/docs/AddUserAsset.py @@ -127,13 +127,13 @@ def test_add_log(): if __name__ == '__main__': - #install() - #test_add_dept() - #test_add_group() - #test_add_user() - #test_add_idc() - #test_add_asset_group() - #test_add_asset() + install() + test_add_dept() + test_add_group() + test_add_user() + test_add_idc() + test_add_asset_group() + test_add_asset() test_add_log() diff --git a/jumpserver/api.py b/jumpserver/api.py index 3034e8f52..06b555515 100644 --- a/jumpserver/api.py +++ b/jumpserver/api.py @@ -257,7 +257,7 @@ def asset_perm_api(asset): user_group_list = [] for perm in perm_list: - user_group_list.extend(perm.user_group.all()) + user_group_list.append(perm.user_group) user_permed_list = [] for user_group in user_group_list: diff --git a/juser/views.py b/juser/views.py index 57a9e2276..51de86bc8 100644 --- a/juser/views.py +++ b/juser/views.py @@ -2,24 +2,18 @@ # Author: Guanghongwei # Email: ibuler@qq.com -import time -import os import random import subprocess from Crypto.PublicKey import RSA import crypt -from django.http import HttpResponseRedirect import datetime from django.shortcuts import render_to_response from django.core.exceptions import ObjectDoesNotExist from django.db.models import Q from django.template import RequestContext -from django.http import HttpResponse from juser.models import UserGroup, User, DEPT -from connect import BASE_DIR -from connect import CONF from jumpserver.views import md5_crypt, LDAPMgmt, LDAP_ENABLE, ldap_conn, page_list_return, pages from jumpserver.api import * diff --git a/templates/nav.html b/templates/nav.html index 09ce635e2..b3aecd104 100644 --- a/templates/nav.html +++ b/templates/nav.html @@ -50,21 +50,16 @@ +{#
  • #} +{# 日志审计#} +{# #} +{#
  • #}
  • - 日志审计 - -
  • -
  • - 上传下载 - + 日志审计
  • - @@ -120,18 +115,7 @@
  • - 日志审计 - -
  • -
  • - 上传下载 - + 日志审计
  • 仪表盘
  • -
  • - 用户管理 - +
  • + 个人信息
  • -
  • - 资产管理 - +
  • + 查看主机
  • -
  • - 日志审计 - +
  • + 申请主机
  • +
  • + 登录历史 +
  • +
  • 上传下载
  • +
  • + 使用说明 +