On Jueves, 20 de Mayo de 2010 13:25:27 Iñaki Baz Castillo escribió: > Hi, I'm adding authorization levels to my AS deployment. I want the > "Create New" button not to be displayed if the logged user has no > enough permissions. > Is there a way to show/hide such link? > Thanks a lot.
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 > > PS: BTW what is the purpose of "config.list.always_show_create = > false"? I've read the documentation and set it but the button is still > displayed. > > > -- > Iñaki Baz Castillo > <[email protected]> -- Sergio Cambra .:: entreCables S.L. ::. Mariana Pineda 23, 50.018 Zaragoza T) 902 021 404 F) 976 52 98 07 E) [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.
