DocSavage / rails-authorization-plugin

This plugin provides a flexible way to add authorization to Rails.

This URL has Read+Write access

a3513ada » bkatz 2006-06-29 Commit of version 1.0rc2 af... 1 require File.dirname(__FILE__) + '/lib/authorization'
2
3 ActionController::Base.send( :include, Authorization::Base )
4 ActionView::Base.send( :include, Authorization::Base::ControllerInstanceMethods )
5
6 # You can perform authorization at varying degrees of complexity.
6dfe9d43 » grempe 2008-02-18 Re-named README to add .txt... 7 # Choose a style of authorization below (see README.txt) and the appropriate
a3513ada » bkatz 2006-06-29 Commit of version 1.0rc2 af... 8 # mixin will be used for your app.
9
10 # When used with the auth_test app, we define this in config/environment.rb
11 # AUTHORIZATION_MIXIN = "hardwired"
8646a6e5 » bkatz 2006-06-29 Fixed default authorization... 12 if not Object.constants.include? "AUTHORIZATION_MIXIN"
a3513ada » bkatz 2006-06-29 Commit of version 1.0rc2 af... 13 AUTHORIZATION_MIXIN = "object roles"
14 end
15
16 case AUTHORIZATION_MIXIN
17 when "hardwired"
0cdfeda1 » bkatz 2006-08-20 Moved all files in Authoriz... 18 require File.dirname(__FILE__) + '/lib/publishare/hardwired_roles'
a3513ada » bkatz 2006-06-29 Commit of version 1.0rc2 af... 19 ActiveRecord::Base.send( :include,
20 Authorization::HardwiredRoles::UserExtensions,
21 Authorization::HardwiredRoles::ModelExtensions
22 )
23 when "object roles"
0cdfeda1 » bkatz 2006-08-20 Moved all files in Authoriz... 24 require File.dirname(__FILE__) + '/lib/publishare/object_roles_table'
a3513ada » bkatz 2006-06-29 Commit of version 1.0rc2 af... 25 ActiveRecord::Base.send( :include,
26 Authorization::ObjectRolesTable::UserExtensions,
0140fd1a » bkatz 2006-07-01 * Repaired identity sugar t... 27 Authorization::ObjectRolesTable::ModelExtensions
a3513ada » bkatz 2006-06-29 Commit of version 1.0rc2 af... 28 )
29 end