Fix access control check for repository name #90
Reference in New Issue
Block a user
Delete Branch "patch-1"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
should fix #89
前缀匹配应该对比仓库名称(reponame)而不是完整名称(fullname)
📝 Walkthrough
Walkthrough
The
checkListfunction in access control logic has been updated to fix wildcard prefix matching. When a list item ends with "*", the function now compares only the repository name against the prefix, rather than the full "username/repo" string.Changes
src/utils/access_control.gocheckListto match against repository name only instead of full repository string (username/repo), narrowing the scope of prefix matching.Estimated code review effort
🎯 2 (Simple) | ⏱️ ~10 minutes
Poem
Pre-merge checks and finishing touches
✅ Passed checks (5 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment
@coderabbitai helpto get the list of available commands and usage tips.Actionable comments posted: 0
🧹 Nitpick comments (1)
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📥 Commits
Reviewing files that changed from the base of the PR and between
31f62fde35and6a1ddd8261.📒 Files selected for processing (1)
src/utils/access_control.go@s0urcelab 有些用户需要匹配仓库的用户名,建议fork修改自己的版本
建议修改一下文档里的说明,描述为“用户名匹配”而不是“前缀匹配”比较好
OK,有空我修复一下让用户名也支持通配符
Pull request closed