diff --git a/apps/jumpserver/views.py b/apps/jumpserver/views.py index c2915ae0d..474eaf829 100644 --- a/apps/jumpserver/views.py +++ b/apps/jumpserver/views.py @@ -21,10 +21,10 @@ class IndexView(AdminUserRequiredMixin, TemplateView): session_month_dates = [] session_month_dates_archive = [] - def get(self, request, *args, **kwargs): + def dispatch(self, request, *args, **kwargs): if not request.user.is_org_admin: return redirect('assets:user-asset-list') - return super(IndexView, self).get(request, *args, **kwargs) + return super(IndexView, self).dispatch(request, *args, **kwargs) @staticmethod def get_user_count(): diff --git a/apps/static/css/jumpserver.css b/apps/static/css/jumpserver.css index cf570c4ad..13b58ac25 100644 --- a/apps/static/css/jumpserver.css +++ b/apps/static/css/jumpserver.css @@ -335,13 +335,13 @@ div.dataTables_wrapper div.dataTables_filter { .nav-header, body.mini-navbar .nav-header { padding: 0; - background: #202c37; + /*background: #202c37;*/ } .profile-element div:first-child { line-height: 60px; /*width: 70px;*/ - float: left; + /*float: left;*/ text-align: center; } diff --git a/apps/static/img/header-profile.png b/apps/static/img/header-profile.png new file mode 100755 index 000000000..7dea7f2c7 Binary files /dev/null and b/apps/static/img/header-profile.png differ diff --git a/apps/templates/_nav.html b/apps/templates/_nav.html index a792beb48..772c9db78 100644 --- a/apps/templates/_nav.html +++ b/apps/templates/_nav.html @@ -1,20 +1,4 @@ {% load i18n %} -{% if ADMIN_ORGS and ADMIN_ORGS|length > 1 %} -