I’ve installed the lasted engines and active_rbac from svn,and
configurated
it as the following.
1:edit the routes.rb,and add
map.connect ‘/active_rbac/registration/confirm/:user/:token’,
:controller => ‘active_rbac/registration’,
:action => ‘confirm’
2:add config.plugins params in environment/development.rb
config.plugins = [“engines”, “*”]
Then i started the server,but it couldn’t find the active_rbac’s lib。The
codes in vender/plugins/active_rbac/init_engine.rb dosen’t take effect.
the codes is this:
require ‘active_rbac/application_controller_mixin’
require the model mixins
require ‘active_rbac/exceptions’
require ‘active_rbac/group_mixin’
…
So i have to add the following ugly code in Applicaiton.rb
require_dependency"#{RABC_DIR}lib/active_rbac/user_mixin"
require_dependency"#{RABC_DIR}lib/active_rbac/user_registration_mixin"
class ApplicationController < ActionController::Base
helper RbacHelper
The application controller will give us the “current_user” method.
include ActiveRbacMixins::ApplicationControllerMixin
why engines not auto import the active_rbac’s lib?
If ActiveRBAC still comes as an “old-style engine”, (i.e. with
init_engine.rb rather than init.rb) then it’s likely not compatible
with the 1.2 (latest) engines plugin. This would certainly explain why
the code in init_engine.rb is not evaluated.
Did you try the activerbac code from rubyforge? Supposedly it has
been updated for 1.2
http://rubyforge.org/frs/?group_id=2972
Looks like only 10 downloads so far, so it may not be very tested yet
and I think the upgrade was done by normal user as opposed to the
original author.
If you read https://lists.cloudcore.com/pipermail/rbac-dev/ you will
see that the original author has plans convert activerbac to a
non-engines based solution.
FYI: It is on my todo list to upgrade, but I have not tried it yet. I
may wait to see if the original author does before I try to decide
which way to go.
Greg
On 3/9/07, martin [email protected] wrote:
I’ve installed the lasted engines and active_rbac from svne$B!$e(Band
2:add config.plugins params in environment/development.rb
require ‘active_rbac/group_mixin’
require_dependency"#{RABC_DIR}lib/active_rbac/application_controller_mixin"
The application controller will give us the “current_user” method.
http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org
http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org
engine-users mailing list
[email protected]
http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org
–
Greg F.
The Norcross Group
Forensics for the 21st Century
I checked out codes from
https://activerbac.turingstudio.com/source/,thatwas out of
data.I’ve seen the rubyforge has releaseed 0.4.1 already.
It works ok with engines 1.2 and rails 1.2.2.Thanks.
I’ve used the converted ActiveRbac mentioned - its working great for
me. The conversion itself is not hard or that complicated.
Cheers,
Brett