you can use that group from the line above : 

```ruby
  if group.members.include?(user) || group.privacy == 'public'
```