pull/26/head
ibuler 2015-12-10 21:55:21 +08:00
parent e65cad5074
commit 014d0935ba
3 changed files with 5 additions and 8 deletions

View File

@ -363,7 +363,6 @@ class MyTask(MyRunner):
self.run("user", module_args, become=True) self.run("user", module_args, become=True)
return self.results return self.results
@staticmethod @staticmethod
def gen_sudo_script(role_list, sudo_list): def gen_sudo_script(role_list, sudo_list):
# receive role_list = [role1, role2] sudo_list = [sudo1, sudo2] # receive role_list = [role1, role2] sudo_list = [sudo1, sudo2]

View File

@ -13,7 +13,7 @@ password = mysql234
database = jumpserver database = jumpserver
[websocket] [websocket]
web_socket_host = 127.0.0.1:3000 web_socket_host = j:3000
[mail] [mail]
mail_enable = 1 mail_enable = 1

View File

@ -229,9 +229,10 @@
data: {}, data: {},
success: function(data){ success: function(data){
var dataArray = data.split(','); var dataArray = data.split(',');
console.log(data+'a'); if (data == 'error' || data == '' || data == null || data == undefined){
console.log(dataArray); layer.alert('没有授权角色')
if (dataArray.length == 1 && data != 'error'){ }
else if (dataArray.length == 1 && data != 'error'){
var title = 'Jumpserver Web Terminal' + '<span class="text-info"> '+ hostname +'</span>'; var title = 'Jumpserver Web Terminal' + '<span class="text-info"> '+ hostname +'</span>';
console.log(new_url+data); console.log(new_url+data);
layer.open({ layer.open({
@ -242,9 +243,6 @@
area: ['628px', '452px'], area: ['628px', '452px'],
content: new_url+data content: new_url+data
}); });
//window.open(new_url + data, '', 'location=no, resizeable=no, height=410, width=625, top=89px, left=99px,toolbar=no,menubar=no,scrollbars=auto,status=no');
} else if (data == 'error' || data == '' || data == null || data == undefined){
layer.alert('没有授权角色')
} else { } else {
aUrl = ''; aUrl = '';
$.each(dataArray, function(index, value){ $.each(dataArray, function(index, value){