Skip to content

Commit

Permalink
add hide ldap for not enable
Browse files Browse the repository at this point in the history
  • Loading branch information
woshihaoren committed Dec 11, 2017
1 parent fcf1144 commit 87f68fb
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion sql/processor.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,29 @@
# -*- coding: UTF-8 -*-
from .models import users
from django.conf import settings

leftMenuBtnsCommon = (
{'key':'allworkflow', 'name':'查看历史工单', 'url':'/allworkflow/', 'class':'glyphicon glyphicon-home'},
{'key':'submitsql', 'name':'发起SQL上线', 'url':'/submitsql/', 'class':'glyphicon glyphicon-asterisk'},
)
leftMenuBtnsSuper = (
{'key':'masterconfig', 'name':'主库地址配置', 'url':'/admin/sql/master_config/', 'class':'glyphicon glyphicon-user'},
{'key':'userconfig', 'name':'用户权限配置', 'url':'/admin/sql/users/', 'class':'glyphicon glyphicon-th-large'},
{'key': 'ldapsync', 'name': '同步LDAP用户', 'url': '/ldapsync/', 'class': 'glyphicon glyphicon-th-large'},
{'key':'workflowconfig', 'name':'所有工单管理', 'url':'/admin/sql/workflow/', 'class':'glyphicon glyphicon-list-alt'},
)
leftMenuBtnsDoc = (
{'key':'dbaprinciples', 'name':'SQL审核必读', 'url':'/dbaprinciples/', 'class':'glyphicon glyphicon-book'},
{'key':'charts', 'name':'统计图表展示', 'url':'/charts/', 'class':'glyphicon glyphicon-file'},
)

if settings.ENABLE_LDAP:
leftMenuBtnsSuper = (
{'key': 'masterconfig', 'name': '主库地址配置', 'url': '/admin/sql/master_config/', 'class': 'glyphicon glyphicon-user'},
{'key': 'userconfig', 'name': '用户权限配置', 'url': '/admin/sql/users/', 'class': 'glyphicon glyphicon-th-large'},
{'key': 'ldapsync', 'name': '同步LDAP用户', 'url': '/ldapsync/', 'class': 'glyphicon glyphicon-th-large'},
{'key': 'workflowconfig', 'name': '所有工单管理', 'url': '/admin/sql/workflow/','class': 'glyphicon glyphicon-list-alt'},
)

def global_info(request):
"""存放用户,会话信息等."""
loginUser = request.session.get('login_username', None)
Expand Down

0 comments on commit 87f68fb

Please sign in to comment.