Hide group to users
This commit is contained in:
parent
5130b2d38e
commit
c5e45ccf51
@ -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)
|
||||
}
|
||||
}
|
||||
|
2
works.go
2
works.go
@ -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)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user