Hello,

Thanks Tim, I finally used your idea. I extended the user model in one 
of my extension and created the 'superadmin?' method.
Then, I changed the visibility.

It works !

Bye,
Vincent



Tim Gossett wrote:
> On Thu, Aug 7, 2008 at 3:15 AM, Vincent Pérès 
> <[EMAIL PROTECTED]>wrote:
> 
>> tabs according to extensions... I would like to do that by an extension,
>> without modify the radiant core.
>> I don't find the right way to do that... anyone has some idea?
>>
> 
> Here's what I did:
> 
> def activate
>   admin.tabs.clear
>   admin.tabs.add "Pages",    "/admin/pages", :visibility => [:admin,
> :developer]
>   admin.tabs.add "Snippets", "/admin/snippets", :visibility => [:admin,
> :developer]
>   admin.tabs.add "Layouts",  "/admin/layouts", :visibility => [:admin,
> :developer]
>   ...
> end
> 
> If you're looking for something like
> 
> admin.tabs.add "Pages",    "/admin/pages", :visibility =>
> [:my_awesome_group]
> 
> you'll need to extend the User model and define my_awesome_group? to 
> return
> true if the member is in that group and false otherwise.
> 
> Now that I've taken the time to write it out, it sounds rather
> straight-forward. Has anyone else done something like this with
> page-group-permissions?

-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to