fix: 英文名只回傳權限範圍內的人 #26

Merged
walkdoggo.yeh merged 4 commits from fix/names-scope into main 2026-11-17 04:10:48 +00:00
Owner

安全修正:English 介面的英文名(/api/names)原本會把全公司名單給任何有權限的人。改成依權限裁切:部主管只拿到自己部門、組主管只拿到自己的組;最高管理者與全公司檢視照舊。

  • english-names.js:新增 visiblePeople()
  • server.js:/api/names 先依權限過濾再回傳
  • 測試:權限範圍單元測試;一般同仁呼叫定錨、HR 組織、薪資、英文名一律 403

測試 67 項全過。回退點:tag rollback-pre-names-scope

🤖 Generated with Claude Code

https://claude.ai/code/session_01VDJVpPiGiWjJP1yVvvGhzQ

安全修正:English 介面的英文名(/api/names)原本會把全公司名單給任何有權限的人。改成依權限裁切:部主管只拿到自己部門、組主管只拿到自己的組;最高管理者與全公司檢視照舊。 - english-names.js:新增 visiblePeople() - server.js:/api/names 先依權限過濾再回傳 - 測試:權限範圍單元測試;一般同仁呼叫定錨、HR 組織、薪資、英文名一律 403 測試 67 項全過。回退點:tag rollback-pre-names-scope 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01VDJVpPiGiWjJP1yVvvGhzQ
walkdoggo.yeh added 4 commits 2026-11-17 04:09:40 +00:00
fix: 英文名只回傳權限範圍內的人
CI / build (push) Successful in 35s
3969754fa4
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VDJVpPiGiWjJP1yVvvGhzQ
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VDJVpPiGiWjJP1yVvvGhzQ
test: 英文名依權限範圍
CI / build (push) Successful in 32s
fdf07d9f27
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VDJVpPiGiWjJP1yVvvGhzQ
test: 一般同仁呼叫定錨、HR 組織、薪資、英文名一律擋下
CI / build (push) Successful in 30s
CI / build (pull_request) Successful in 31s
fb898f9b54
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VDJVpPiGiWjJP1yVvvGhzQ
walkdoggo.yeh merged commit 7dee63343d into main 2026-11-17 04:10:48 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: walkdoggo.yeh/leadboard#26