I wrote up a quick wiki page on what I did to get things working with
declarative_authorization:

https://github.com/activescaffold/active_scaffold/wiki/Security:-declarative-authorization


On Oct 17, 9:43 am, Nick Rogers <[email protected]> wrote:
> I don't have any experience with the default_permission parameter. My guess
> is you are missing some method override that tells active_scaffold it is
> allowed to show the list view. However I would think this would be the
> "list" action, which you already have.
>
> I have good luck using an implicit "default_permission" of true and the
> following methods in my controllers.
>
> def list_authorized?(record = nil)
>   current_admin.read_system?
> end
>
> def show_authorized?(record = nil)
>   current_admin.read_system?
> end
>
> def create_authorized?(record = nil)
>   current_admin.write_system?
> end
>
> def update_authorized?(record = nil)
>   current_admin.write_system?
> end
>
> def delete_authorized?(record = nil)
>   current_admin.write_system?
> end
>
> def search_authorized?(record = nil)
>   current_admin.read_system?
> end
>
> def export_authorized?(record = nil)
>   current_admin.read_system?
> end
>
>
>
>
>
>
>
> On Mon, Oct 17, 2011 at 9:46 AM, JB <[email protected]> wrote:
> > Genius! Removing the "config.security.default_permission = false" line
> > solved it.
>
> > I'm actually using declarative_authorization. When I have some time
> > later today or this week, I'll add a page to the wiki explaining how
> > I'm doing it.
>
> > On Oct 17, 7:37 am, Nick Rogers <[email protected]> wrote:
> > > Have you tried removing the "config.security.default_permission = false"
> > > line. Does that change things?
>
> > > Could you paste a copy of your scaffold controller?
>
> > --
> > 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.

-- 
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