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

Restrict the pages tab to users with the dev role:

admin.tabs[‘Pages’].visibility = [:dev]

Dan.

Daniel S. 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 L.
http://wiseheartdesign.com