Always show create is used for cases in which people want the create form to 
always be displayed, and is set to false by default. There might be a better 
way to do this, and I'm doing this from memory so it might not be completely 
correct, but in your contoller put a before filter 
before_filter :check_auth_for_create

def check_auth_for_create
  if(user has correct auth)
  active_scaffold_config.exlude :create
  else 
active_scaffold_config.include :create
  end
end

If the sytax is correct this only disables the link, you will need to also put 
protection around the create action.

Sergio will probably have better feedback.
Sent from my Verizon Wireless BlackBerry

-----Original Message-----
From: Iñaki Baz Castillo  [email protected] 
Date: Thu, 20 May 2010 13:25:27 
To: <[email protected]>
Subject: How to dissable the "Create New" link?

Hi, I'm adding authorization levels to my AS deployment. I want the
"Create New" button not to be displayed if the logged user has no
enough permissions.
Is there a way to show/hide such link?
Thanks a lot.

PS: BTW what is the purpose of "config.list.always_show_create =
false"? I've read the documentation and set it but the button is still
displayed.


-- 
Iñaki Baz Castillo
<[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.

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