feat(权限): 收敛普通账号写权限至本人凭证
将调度时刻、采集参数等实例级配置收归管理员,普通账号仅可维护本人 Cookie 与 User-Agent。 新增 config.writable_by 作为唯一写权限入口,set_setting 强制全局键落到 user_id=0, 消除「管理员改了只有自己生效」的静默缺陷。新增 tools/check_docs.py 文档自检, smoke 断言扩至 215 项、check_live 扩至 122 项并支持普通账号越权验收, 忽略 backups/、data/*.bak* 与 legacy-v1/,版本升至 v1.3.0。
这个提交包含在:
@@ -5,7 +5,7 @@
|
||||
<div class="pagehead">
|
||||
<div>
|
||||
<h1>日志管理</h1>
|
||||
<p class="lead">采集逐次日志、应用运行日志与操作审计</p>
|
||||
<p class="lead">本机全实例的采集日志、应用运行日志与操作审计(仅管理员可见)</p>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<button class="btn" id="btnTail" type="button">刷新应用日志</button>
|
||||
@@ -49,12 +49,13 @@
|
||||
</div>
|
||||
<div class="tablewrap">
|
||||
<table class="tbl">
|
||||
<thead><tr><th>#</th><th>开始</th><th>触发</th><th>状态</th><th class="num">耗时</th>
|
||||
<thead><tr><th>#</th><th>账号</th><th>开始</th><th>触发</th><th>状态</th><th class="num">耗时</th>
|
||||
<th class="num">新增</th><th class="num">重复</th><th class="num">冲突</th><th>结论</th><th></th></tr></thead>
|
||||
<tbody>
|
||||
{% for r in runs %}
|
||||
<tr>
|
||||
<td>{{ r.id }}</td>
|
||||
<td>{{ r.uname }}</td>
|
||||
<td class="mono nowrap">{{ r.started_at[5:] if r.started_at else '—' }}</td>
|
||||
<td><span class="tag {{ 'info' if r.trigger=='schedule' else ('accent' if r.trigger=='startup' else 'mute') }}">{{ r.trigger }}</span></td>
|
||||
<td class="nowrap">
|
||||
@@ -70,7 +71,7 @@
|
||||
<td><a href="{{ url_for('views.logs', run=r.id, status=status or none) }}">详情</a></td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr><td colspan="10" class="empty">暂无采集日志</td></tr>
|
||||
<tr><td colspan="11" class="empty">暂无采集日志</td></tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
在新工单中引用
屏蔽一个用户