This commit is contained in:
WJQSERVER 2024-10-06 01:03:38 +08:00
parent 5dbf137116
commit b87a8de3c4
5 changed files with 16 additions and 20 deletions

View file

@ -1,9 +1,10 @@
package auth
func CheckBlacklist(fullrepo string) bool {
if fullrepo == "test/test1" {
logw("%s in blacklist", fullrepo)
return true
func CheckBlacklist(fullrepo string, blist []string) bool {
for _, blocked := range blist {
if blocked == fullrepo {
return true
}
}
logw("%s not in blacklist", fullrepo)
return false