El Monday 27 April 2009 18:45:25 Soren escribió:
> Hi,
>
> I have a users model based on the restful-authentication.
> I also have a Klass model that has a couple of referenced user fields
> - teacher, parent1, parent2 and ia.
> Both controllers are using AS.
>
> In my users model the edit action is controlled by an
> authorized_for_update? method, but when I go to the list view of the
> Klass then all the associated links are active - and if you click then
> (without the appropriate user role) you correctly gets this error
> message from AS:
>
>
> ActiveScaffold::RecordNotAllowed
> (ActiveScaffold::RecordNotAllowed):                 /vendor/plugins/
> active_scaffold/lib/active_scaffold/finder.rb:136:in `find_if
> _allowed'
>
> But why can you get here ?
>
> Do I need to do something active in my Klass model to deactivate the
> links? or should AS have noticed that they are not authorized and
> therefore disabled them. Placing a authorized_for_update? in the Klass
> model surely solves the problem but also 'dull' the links. Is there a
> compromise that just leave them readable but not active (besides -
> hack the CSS)..

It should be fixed now. Try it.


-- 
Sergio Cambra .:: entreCables S.L. ::.
Nicolás Guillén 6, locales 2 y 3. 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