daddy/internal/model/helper.go

16 lines
219 B
Go
Raw Permalink Normal View History

package model
func inWorkgroup(user *User, workgroup *Workgroup) bool {
if workgroup == nil {
return false
}
for _, w := range user.Workgroups {
if w.ID == workgroup.ID {
return true
}
}
return false
}