Need to understand how does the housing socieities /apartments make rules to use Swimming pool and Gym

1. Are only owners are allowed ?

2. Owner is living with spouse , children , parents then are all of them allowed ?

3. Visiting relatives like siblings/ in laws are allowed ?

4. Are friends allowed with 1 day pass but only when signed by owner / living member?

5. Is there any way , if socieity not allows we can contradict by stating any law if in favour.