2010/5/20 Sergio Cambra .:: entreCables S.L. ::. <[email protected]>: > Define a security method, it will be used to show/hide create link, and to > avoid entering the action to users without permissions: > > #model > def self.authorized_for_create? > current_user.authorized_for_create_this_model > end > > http://wiki.github.com/activescaffold/active_scaffold/security
Hi Sergio. It works, however the wiki is wrong then as it shows a instance method rather than a class method (in Model security): def authorized_for_delete? # anonymous users may never destroy these/this records return false unless current_user # unless it's an existing record and a 'permanent' flag has been thrown return (self.permanent == false) end -- Iñaki Baz Castillo <[email protected]> -- 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.
