On Miércoles, 5 de Mayo de 2010 21:22:56 Iñaki Baz Castillo escribió:
> Hi, which are the valid values for 'action'? I'm trying to disable
> list view list for some users:

Any value is valid for action, but it's used to enable or disable action 
links. It was added to improve security checks for custom actions, so 
controller filters must be added for that custom action. ActiveScaffold 
controller filters don't check against action, only crud type, because it was 
added later. Maybe we should add that check in controller filters.

Anyway, you can see in lib/active_scaffold/actions/list.rb that filter to check 
permissions is list_authorized_filter, which check against :read crud_type, so 
you should add a class method authorized_for_read:

def self.authorized_for_read?
        current_user.allowed_to_list
end

> then anything is disabled (of course), including list view. So, what
> is the 'list' action name? Also, which 'action' values are there?
> which is the difference between "delete" action and "destroy" action?

Delete action is only used when you disable or skip JS request. Then a 
confirmation is rendered. Destroy action really destroy the record.

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

Reply via email to