29 Commits

Author SHA1 Message Date
Aqr-K
5aebc7ac59 fix(auth): preserve administrator and credential consistency (#7141) 2026-10-23 06:50:30 +08:00
DDSRem
2de976f6b3 Merge pull request #7050 from DDSRem-Dev/codex-comment-migration
docs: 统一全项目中文注释和结构化契约说明
2026-10-17 19:26:29 +08:00
jxxghp
ea60ed0fd6 feat(community): recognize GitHub contributions and honor levels 2026-10-15 12:11:36 +08:00
jxxghp
ad4c92da9e Merge branch 'v3' into fix/media-scrape-manage-permission 2026-10-05 16:38:08 +08:00
jxxghp
49235b7dd6 Merge pull request #6891 from MiCat-S/fix/webpush-send-superuser 2026-10-05 16:33:21 +08:00
LIN student
873c4c7087 fix(media): 刮削接口要求管理权限,与手动整理和文件管理保持一致
POST /api/v1/media/scrape/{storage} 只依赖 verify_token,任何登录用户都可
调用。该接口以 overwrite=True 调用刮削链,会覆盖目标目录已有的海报、背景图
和 NFO,音频文件还会改写标签;存储与路径完全由请求提供。

同类写操作 /transfer/manual、/transfer/manual/target-path、/storage/* 以及
整理记录的写操作都要求 manage 权限;前端只在文件管理页(需 manage 权限)
调用该接口,Agent 策略也已把 media.scrape 定为管理员操作。

现改为依赖 get_current_active_manage_user。_scrape_impl 内部没有使用令牌
载荷,去掉其中未使用的 Depends 参数。API_TOKEN/apikey 调用解析为 SUPERUSER
对应的超级管理员,行为不变。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 15:42:29 +08:00
LIN student
dc974b6699 fix(message): WebPush 主动推送接口仅限超级管理员
POST /message/webpush/send 只依赖 verify_token,会把调用方提供的
title、body、url 推送给 webpush_registry 中的全部浏览器订阅,包括其他
用户和管理员的浏览器。前端只调用 /message/webpush/subscribe,不调用该
接口。

改为与同模块 /message/web 一致的 get_current_active_superuser。
API_TOKEN / apikey 由 verify_token 映射为 SUPERUSER 对应的超级管理员
账号,经过该依赖后仍可调用,已有外部集成不受影响。

/message/webpush/subscribe 保持登录用户可用,每个用户的前端都会调用它
登记自己的浏览器。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 15:42:29 +08:00
LIN student
75d8b2e441 fix(system): 公开设置不再返回存储的连接配置
/system/setting/public/{key} 只要求登录用户,白名单中的 Storages 原样返回
整个存储列表,每项的 config 保存着各存储的连接配置和凭据(SMB 用户名密码、
alist 账号、115 token 等)。设置合同已将 Storages 标记为 sensitive,
/system/settings 默认会脱敏,只有这个公开接口直接返回原值。

前端 v3 已改用 /storage/options 读取存储名称和类型,公开接口的 Storages
目前只剩 Agent 的 config.public.get 和旧版前端页面会用到,它们只需要
name、type。因此保留该 key,改为与 /storage/options 相同的投影:只返回
name(缺省时取 type)和 type,跳过没有 type 的项。所有调用者返回相同
结果,超级管理员仍可通过 /system/setting/Storages 读取完整配置。

白名单内其他配置(目录、站点范围、集数定位规则、默认订阅规则、Follow
订阅者)不含连接凭据,保持原值返回。同步更新 docs/mcp-api.md 的接口说明。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 15:42:28 +08:00
jxxghp
8e9c9b41e1 fix(api): allow slashes in rule group names 2026-09-30 23:31:55 +08:00
moviepilot-codex[bot]
d96f00113c feat: add GitHub Token device authorization 2026-09-21 18:30:15 +08:00
moviepilot-codex[bot]
c0f7141e26 fix(plugin): invalidate federation static resource cache (#6748) 2026-09-21 16:24:38 +08:00
jxxghp
06ed22c584 feat(agent): improve browser-assisted site cookie login 2026-09-11 14:31:01 +08:00
jxxghp
f00853de2a feat(api): expose frontend-safe management capabilities 2026-09-05 15:11:02 +08:00
InfinityPacer
5c70757a81 fix(auth): align v3 authentication contracts
按已确认的 V3 AUTH-001 交付门禁合并:后端认证与用户资料契约已完成本地前后端联调,Architecture、Coverage、单测分片和 Pylint 全部通过。
2026-08-31 04:57:34 +08:00
jxxghp
9146c75941 feat(auth): add first-run administrator initialization 2026-08-30 09:05:23 +08:00
InfinityPacer
d58c8d2b17 feat: 完善数据库备份管理与版本读取 (#6450) 2026-08-25 16:05:45 +08:00
jxxghp
4dd2d7fed2 refactor: use explicit runtime facade getters 2026-08-24 03:56:54 +08:00
jxxghp
1bb6e36e8c refactor: complete runtime configuration migration 2026-08-22 19:07:07 +08:00
jxxghp
8472bcff43 refactor: 收口 V3 分层架构与插件兼容边界 2026-08-18 13:22:02 +08:00
Aqr-K
8a11214a43 refactor(db): 修复异步连接池无界增长,并完成 SQLAlchemy 2.0 迁移与分层归位 (#6320) 2026-08-15 06:58:38 +08:00
jxxghp
369d7d6448 refactor: reorganize backend module boundaries 2026-08-14 19:53:33 +08:00
jxxghp
7b3444c366 refactor backend module architecture 2026-08-14 15:45:38 +08:00
InfinityPacer
006b6f6318 fix(auth): support nested feature permissions (#6310) 2026-08-14 10:21:27 +08:00
jxxghp
baf8850d63 refactor(api): standardize responses and restore media config contracts 2026-08-12 23:15:13 +08:00
jxxghp
36666313b7 feat: 按媒体类型筛选搜索站点 2026-08-09 18:12:29 +08:00
jxxghp
5654512d41 fix(api): return avatar filename in data 2026-08-06 23:36:34 +08:00
jxxghp
36d4434596 fix: allow manage users to access management APIs 2026-07-05 20:23:04 +08:00
jxxghp
9b1bdb0cb2 feat(dashboard): add system summary endpoint and monthly media statistics 2026-06-28 17:49:09 +08:00
jxxghp
dc2b6910a4 fix: restrict sensitive system endpoints 2026-06-09 21:45:51 +08:00