# Global condition clause

**URL:** <https://www.ruby-forum.com/t/global-condition-clause/171039>\
**Category:** Rails\
**Created:** [June 25, 2009, 5:12pm UTC](https://www.ruby-forum.com/t/global-condition-clause/171039 "2009-06-25T17:12:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![billv](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bb73d2/32.png) [@billv](https://www.ruby-forum.com/u/billv)\
**Post date:** [June 25, 2009, 5:12pm UTC](https://www.ruby-forum.com/t/global-condition-clause/171039/1 "2009-06-25T17:12:12Z")

</div>

I would like to restrict database calls globally. Specifically, I  
have a project mgt program and want to restrict access to projects on  
a user basis. Among others, I have a user and project model. I can  
place a condition clause on a relationship, but can I place a  
condition on the model itself?
