On Lunes, 7 de Diciembre de 2009 21:46:13 Chris Drappier escribió:
> Hi All,
>
> I'm trying to render the edit form for a record, and I keep getting an
> ActionNotAllowed error from the model. after digging around, i found that
> AS is calling authorized_for_update? against a new instantiation of the
> model rather than the current record. Is this on purpose? How can I make it
> call the current record as opposed to a new one?

filter check against new record (against class in security branch, which will 
be merged sometime). After that do_edit uses find_if_allowed, which check 
against current record.

Permissions are checked against class (currently it uses a new record to check 
class permissions), it's used to check whether current_user has edit 
permissions. When security branch will be merged, you can avoid defining an 
authorized_for_update? class method if you don't need to check that kind of 
permissions

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

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