Edu Mariano
unread,Aug 3, 2011, 2:53:00 PM8/3/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to acl9-discuss
Hi, first of all sorry for posting in portuguese, kk
now in english
i has te following code:
access_control do
#--------------------------------Permissões liberadas para
administrador-----------------------------------
allow :Administrador
#----------------------------------------Permissões para
indicators----------------------------------------
@roles = Permission.find(:all,
:joins => :role,
:joins => :interface,
:conditions => {:interfaces => {:name =>
params[:interface] }})
@roles.map do |r|
allow r.role.name.to_sym, :to => [:edit] if r.read
allow r.role.name.to_sym, :to => [:new, :create, :live_search]
if r.include
allow r.role.name.to_sym, :to => [:edit, :update, :live_search]
if r.write
allow r.role.name.to_sym, :to => [:destroy] if r.exclude
end
#----------------------------------------------------------------------------------------------------------
end
wich is giving the following error:
undefined local variable or method `params' for
Acl9::Dsl::Generators::FilterLambda:0x4979430>
I would like to know if is possible to pass parameters inside access
control block, i have tried class variables, but it gives me
concurrency problems.
Thank in advance
Desde já agradeço