Re: [Radiant] Hide pages/snippets/layouts admin tabs?
Daniel Sheppard wrote: Restrict the pages tab to users with the dev role: admin.tabs['Pages'].visibility = [:dev] Well, not quite. That only hides the tab from the user's view. To be secure you will need to use the only_allow_access_to class method inside the body of the controller definition. Here's a good example from the LayoutController: only_allow_access_to :index, :new, :edit, :remove, :when = [:developer, :admin], :denied_url = { :controller = 'page', :action = 'index' }, :denied_message = 'You must have developer privileges to perform this action.' http://dev.radiantcms.org/radiant/browser/trunk/radiant/app/controllers/admin/layout_controller.rb -- John Long http://wiseheartdesign.com ___ Radiant mailing list Post: Radiant@lists.radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Hide pages/snippets/layouts admin tabs?
Restrict the pages tab to users with the dev role: admin.tabs['Pages'].visibility = [:dev] Dan. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Karl Doody Sent: Monday, 19 March 2007 10:37 AM To: radiant@lists.radiantcms.org Subject: [Radiant] Hide pages/snippets/layouts admin tabs? Hi all, Just a quickie, is there a way (through the users/roles?) to hide the page, snippets, and layouts admin tabs? i.e. with the aim of having a user who, once logged in, can only see/use the tabs created through my extensions. Kind regards, -Karl ___ Radiant mailing list Post: Radiant@lists.radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant ___ Radiant mailing list Post: Radiant@lists.radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant