fix: add hide check to canAccess (close #2532)

This commit is contained in:
Noah Hsu
2022-11-30 22:01:33 +08:00
parent b5bf5f4325
commit 4980b71ba3
3 changed files with 21 additions and 9 deletions

View File

@ -84,7 +84,7 @@ func hide(objs []model.Obj, meta *model.Meta) []model.Obj {
deleted := make([]bool, len(objs))
rs := strings.Split(meta.Hide, "\n")
for _, r := range rs {
re, _ := regexp.Compile(r)
re := regexp.MustCompile(r)
for i, obj := range objs {
if deleted[i] {
continue