Hi all,

First of all, great job on building a great plugin.

I had a question regarding the addition of the CRUD security methods
to the models. I have written a user-roles-premissions framework in
which an admin can define model level permissions on the fly. When
such permissions are defined, I would like to add activescaffold
security methods to the respective model on the fly. Following is how
I'm trying to set it up at the moment on the model in which I need to
specify security for the action...

def self.add_column_security(method_name, module_name, action,
field_name)
    if !method_defined?(method_name)
      logger.info("----> Creating security method - #{method_name}
(#{module_name}, #{action}, #{field_name})")
      define_method(method_name) do
        logger.info("---->>> #{method_name} CALLED!!")
        current_user.action_allowed_for?(action, module_name,
field_name)
      end
    end
end

I do not see the method being called though when I access the scaffold
of the model. Could you guys point out what I'm doing wrong here, or
if something like this is possible at all?

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/activescaffold?hl=en.

Reply via email to