friendica/friendica — pull request #497 by fermionic (2012-09-30 00:09:45+00:00)
Title: allow contact if in allowed group, even if not in non-empty allowed contacts

In a certain situation, where one user posted to a set of explicitly allowed contacts and groups, people in the group were not allowed to access the photo. This is because the permissions_sql function only allowed access if someone was both in the group list and the contact list, or if one of the two was empty and the person was in the other.