mirror of https://github.com/tp4a/teleport
修正:从用户组中移除用户时会因数据库操作失败而无法进行。
parent
878ca416b2
commit
2c487e9fc1
|
@ -34,7 +34,7 @@ $assist.init = function (cb_stack) {
|
||||||
// if (version_compare()) {
|
// if (version_compare()) {
|
||||||
// error_process(ret, func_success, func_error);
|
// error_process(ret, func_success, func_error);
|
||||||
// } else {
|
// } else {
|
||||||
// func_error(ret, TPE_OLD_ASSIST, '助手版本太低,请<a style="color:#aaaaff;" target="_blank" href="http://teleport.eomsoft.net/download">下载最新版本</a>!');
|
// func_error(ret, TPE_OLD_ASSIST, '助手版本太低,请<a style="color:#aaaaff;" target="_blank" href="http://tp4a.com/download">下载最新版本</a>!');
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
error: function () {
|
error: function () {
|
||||||
|
@ -68,7 +68,7 @@ $assist._make_message_box = function () {
|
||||||
'<div class="alert alert-info" role="alert">',
|
'<div class="alert alert-info" role="alert">',
|
||||||
'<p>需要TELEPORT助手来辅助远程连接,请确认本机运行了TELEPORT助手!</p>',
|
'<p>需要TELEPORT助手来辅助远程连接,请确认本机运行了TELEPORT助手!</p>',
|
||||||
'</div>',
|
'</div>',
|
||||||
'<p>如果您尚未运行TELEPORT助手,请 <a href="http://teleport.eomsoft.net/download" target="_blank"><strong>下载最新版TELEPORT助手</strong></a> 并安装。一旦运行了TELEPORT助手,即可重新进行远程连接。</p>',
|
'<p>如果您尚未运行TELEPORT助手,请 <a href="http://tp4a.com/download" target="_blank"><strong>下载最新版TELEPORT助手</strong></a> 并安装。一旦运行了TELEPORT助手,即可重新进行远程连接。</p>',
|
||||||
'</div>',
|
'</div>',
|
||||||
'<div class="modal-footer">',
|
'<div class="modal-footer">',
|
||||||
'<button type="button" class="btn btn-sm btn-default" data-dismiss="modal"><i class="fa fa-times fa-fw"></i> 我知道了</button>',
|
'<button type="button" class="btn btn-sm btn-default" data-dismiss="modal"><i class="fa fa-times fa-fw"></i> 我知道了</button>',
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
<table id="db-info" class="table"></table>
|
<table id="db-info" class="table"></table>
|
||||||
<div class="alert alert-warning">
|
<div class="alert alert-warning">
|
||||||
<i class="fas fa-exclamation-triangle"></i> 注意:如果以上配置并不是您所期望的,请修改您的配置文件,然后刷新本页面。
|
<i class="fas fa-exclamation-triangle"></i> 注意:如果以上配置并不是您所期望的,请修改您的配置文件,然后刷新本页面。
|
||||||
<a href="https://github.com/eomsoft/teleport/wiki/deployment-config" target="_blank">如何设置配置文件?</a>
|
<a href="https://docs.tp4a.com/config/" target="_blank">如何设置配置文件?</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
<nav class="navbar navbar-fixed-top">
|
<nav class="navbar navbar-fixed-top">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="/" class="logo"><img src="${ static_url('img/site-logo.png') }" alt="TELEPORT,触维软件旗下产品。"/></a></li>
|
<li><a href="/" class="logo"><img src="${ static_url('img/site-logo.png') }" alt="TELEPORT"/></a></li>
|
||||||
<li>
|
<li>
|
||||||
<div class="desc">连接 · 尽在指掌中</div>
|
<div class="desc">连接 · 尽在指掌中</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
## <a href="http://teleport.eomsoft.net" target="_blank"><span class="logo"></span></a>
|
## <a href="http://tp4a.com/" target="_blank"><span class="logo"></span></a>
|
||||||
</%block>
|
</%block>
|
||||||
|
|
||||||
<div class="page-content">
|
<div class="page-content">
|
||||||
|
|
|
@ -236,8 +236,9 @@ def remove_members(gtype, gid, members):
|
||||||
sql_list.append(sql)
|
sql_list.append(sql)
|
||||||
sql = 'DELETE FROM `{}ops_map` WHERE {gname}_id={gid} AND {name}_id IN ({ids});'.format(db.table_prefix, gname=gname, name=name, gid=gid, ids=mids)
|
sql = 'DELETE FROM `{}ops_map` WHERE {gname}_id={gid} AND {name}_id IN ({ids});'.format(db.table_prefix, gname=gname, name=name, gid=gid, ids=mids)
|
||||||
sql_list.append(sql)
|
sql_list.append(sql)
|
||||||
sql = 'DELETE FROM `{}audit_map` WHERE {gname}_id={gid} AND {name}_id IN ({ids});'.format(db.table_prefix, gname=gname, name=name, gid=gid, ids=mids)
|
if gtype != TP_GROUP_ACCOUNT:
|
||||||
sql_list.append(sql)
|
sql = 'DELETE FROM `{}audit_map` WHERE {gname}_id={gid} AND {name}_id IN ({ids});'.format(db.table_prefix, gname=gname, name=name, gid=gid, ids=mids)
|
||||||
|
sql_list.append(sql)
|
||||||
|
|
||||||
if db.transaction(sql_list):
|
if db.transaction(sql_list):
|
||||||
return TPE_OK
|
return TPE_OK
|
||||||
|
|
Loading…
Reference in New Issue