修复GitHub用户名通配符
This commit is contained in:
@@ -200,6 +200,13 @@ func (ac *AccessController) checkList(matches, list []string) bool {
|
||||
if strings.HasPrefix(fullRepo, item+"/") {
|
||||
return true
|
||||
}
|
||||
|
||||
if strings.HasPrefix(item, "*/") {
|
||||
p := item[2:]
|
||||
if p == repoName || (strings.HasSuffix(p, "*") && strings.HasPrefix(repoName, p[:len(p)-1])) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user