16 lines
219 B
Go
16 lines
219 B
Go
|
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
|
||
|
}
|