mirror of https://github.com/jumpserver/jumpserver
update for pull#47
parent
0b79f754f9
commit
fa195c3808
|
@ -37,6 +37,7 @@ nosetests.xml
|
||||||
.mr.developer.cfg
|
.mr.developer.cfg
|
||||||
.project
|
.project
|
||||||
.pydevproject
|
.pydevproject
|
||||||
|
.settings
|
||||||
*.log
|
*.log
|
||||||
logs/*
|
logs/*
|
||||||
keys/*
|
keys/*
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
eclipse.preferences.version=1
|
|
||||||
encoding/connect.py=UTF-8
|
|
|
@ -583,7 +583,8 @@ class Nav(object):
|
||||||
elif len(roles) == 1: # 授权角色数为1
|
elif len(roles) == 1: # 授权角色数为1
|
||||||
role = roles[0]
|
role = roles[0]
|
||||||
else:
|
else:
|
||||||
color_print('当前用户未被授予角色,无法执行任何操作,如有疑问请联系管理员。', exits=True)
|
color_print('当前用户未被授予角色,无法执行任何操作,如有疑问请联系管理员。')
|
||||||
|
return
|
||||||
assets = list(self.user_perm.get('role', {}).get(role).get('asset')) # 获取该用户,角色授权主机
|
assets = list(self.user_perm.get('role', {}).get(role).get('asset')) # 获取该用户,角色授权主机
|
||||||
print "授权包含该系统用户的所有主机"
|
print "授权包含该系统用户的所有主机"
|
||||||
for asset in assets:
|
for asset in assets:
|
||||||
|
|
|
@ -83,8 +83,8 @@ class Setup(object):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _cp_zzsh():
|
def _cp_zzsh():
|
||||||
os.chdir(os.path.join(jms_dir, 'install'))
|
os.chdir(os.path.join(jms_dir, 'install'))
|
||||||
bash("sed -i 's#/opt/jumpserver#%s#g' zzjumpserver.sh" % jms_dir)
|
|
||||||
shutil.copy('zzjumpserver.sh', '/etc/profile.d/')
|
shutil.copy('zzjumpserver.sh', '/etc/profile.d/')
|
||||||
|
bash("sed -i 's#/opt/jumpserver#%s#g' /etc/profile.d/zzjumpserver.sh" % jms_dir)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _run_service():
|
def _run_service():
|
||||||
|
|
Loading…
Reference in New Issue