Hi, Take a look at http://wiki.github.com/activescaffold/active_scaffold/security
Security/Authorization has to levels: controller action and model crud The model based security system knows about the current_user and the current_record and therefore provides what you are trying to achieve. Showing either show or edit action_links is not covered by configuration opitions... as far as I know. I suggest to overwrite _list_actions view in your controller... -- volker On 23 Sep., 23:44, alexp <[email protected]> wrote: > Hi all > > Just wondering how best to limit the edit function for a list view, > i.e. only allow edit/update on records the user owns > > using to limit in list view I can do the following to restrict the > list to the current users owned records, > ------------ > def conditions_for_collection > return nil unless current_user > return ['managers.user_id = ?', current_user.id] > end > > def active_scaffold_joins > @active_scaffold_joins ||= [:manager] > end > > but then I'd like to work out how to display a full list of all > records for the model and then change the config.update.link to allow > the edit option otherwise default to show based on the current_user > > Thanks! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
