RoleRequirement With Authlogic

if you need to use rolerequirement with authlogic you just need a few tweeks to the current code in role requirement

in your rails project load the file “/lib/role_requirement_system.rb” into your editor

comment the line in this method on line 106

module RoleSecurityInstanceMethods
def self.included(klass)
#raise "Because role_requirement extends acts_as_authenticated, You must include AuthenticatedSystem first before including RoleRequirementSystem!" unless klass.included_modules.include?(AuthenticatedSystem)
end

1 Comment

  1. rubynyc said,

    September 2, 2009 at 11:05 pm

    Sucks, you don’t need it role your own, Authlogic has a built in for require user and require no user to be used with a before filter only / except actions


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: