Hide group to users
This commit is contained in:
parent
5130b2d38e
commit
c5e45ccf51
@ -32,6 +32,7 @@ func init() {
|
|||||||
var response []Survey
|
var response []Survey
|
||||||
for _, s := range surveys {
|
for _, s := range surveys {
|
||||||
if s.Group == "" || strings.Contains(u.Groups, ","+s.Group+",") {
|
if s.Group == "" || strings.Contains(u.Groups, ","+s.Group+",") {
|
||||||
|
s.Group = ""
|
||||||
response = append(response, s)
|
response = append(response, s)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
2
works.go
2
works.go
@ -29,6 +29,7 @@ func init() {
|
|||||||
var response []Work
|
var response []Work
|
||||||
for _, w := range works {
|
for _, w := range works {
|
||||||
if w.Group == "" || strings.Contains(u.Groups, ","+w.Group+",") {
|
if w.Group == "" || strings.Contains(u.Groups, ","+w.Group+",") {
|
||||||
|
w.Group = ""
|
||||||
response = append(response, w)
|
response = append(response, w)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -51,6 +52,7 @@ func init() {
|
|||||||
var response []OneWork
|
var response []OneWork
|
||||||
for _, w := range works {
|
for _, w := range works {
|
||||||
if w.Group == "" || strings.Contains(u.Groups, ","+w.Group+",") {
|
if w.Group == "" || strings.Contains(u.Groups, ","+w.Group+",") {
|
||||||
|
w.Group = ""
|
||||||
response = append(response, w)
|
response = append(response, w)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user