# \[ANN\] GateKeeper 0.2 - Model Level Permissions Management

**URL:** <https://www.ruby-forum.com/t/ann-gatekeeper-0-2-model-level-permissions-management/132382>\
**Category:** Rails\
**Created:** [March 19, 2008, 4:35pm UTC](https://www.ruby-forum.com/t/ann-gatekeeper-0-2-model-level-permissions-management/132382 "2008-03-19T16:35:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonlog](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/db5fbb/32.png) [@jonlog](https://www.ruby-forum.com/u/jonlog)\
**Post date:** [March 19, 2008, 4:35pm UTC](https://www.ruby-forum.com/t/ann-gatekeeper-0-2-model-level-permissions-management/132382/1 "2008-03-19T16:35:24Z")

</div>

GateKeeper 0.2 is now available.

GateKeeper is a Ruby on Rails plugin providing natural language commands  
to intuitively manage complex access/security permissions on  
ActiveRecord models. Permissions may be based on user’s system wide  
roles (Admin, Moderator, Employee of the Month) and on user’s  
relationship to individual records through ActiveRecord associations.

Version 0.2 adds traversal of eagerly loaded associations to verify read  
permissions on loaded objects.

Rdocs and installation instructions available at  
[http://gatekeeper.rubyforge.org/](http://gatekeeper.rubyforge.org/)

As an appetizer, here are some sample permission declarations you can  
add to your models for GateKeeper to enforce.

class Article \< ActiveRecord::Base  
crudable\_by\_admin  
crudable\_by\_my\_author  
readable\_by\_supervisor\_of\_my\_author  
updateable\_by\_supervisor\_of\_my\_author :unless =\> :first\_draft?  
readable\_by\_premium\_subscriber :if =\> :published?  
destroyable\_as\_my\_author #inherits ‘destroy’ permissions from author  
readable\_by\_guest :if =\> lambda { |article| article.published\_on \<  
3.months.ago }  
etc. etc. etc

–  
[http://www.5valleys.com/](http://www.5valleys.com/)

[http://www.workingwithrails.com/person/8078](http://www.workingwithrails.com/person/8078)
