Hide group to users

This commit is contained in:
nemunaire 2022-07-09 20:52:22 +02:00
parent 5130b2d38e
commit c5e45ccf51
2 changed files with 3 additions and 0 deletions

View File

@ -32,6 +32,7 @@ func init() {
var response []Survey
for _, s := range surveys {
if s.Group == "" || strings.Contains(u.Groups, ","+s.Group+",") {
s.Group = ""
response = append(response, s)
}
}

View File

@ -29,6 +29,7 @@ func init() {
var response []Work
for _, w := range works {
if w.Group == "" || strings.Contains(u.Groups, ","+w.Group+",") {
w.Group = ""
response = append(response, w)
}
}
@ -51,6 +52,7 @@ func init() {
var response []OneWork
for _, w := range works {
if w.Group == "" || strings.Contains(u.Groups, ","+w.Group+",") {
w.Group = ""
response = append(response, w)
}
}