Re: Check for admin panels

mikespub <[email protected]> Tue, 11 Jan 2005 11:19:46 +0100
Newsgroups gmane.comp.cms.xaraya.ui
Organization Xaraya
Message-ID <[email protected]>
Chris wrote:
> ...
 > Hi MIke,
> 
> You may be right, it's just I know that I can achieve my aim using
> this method. If there's a better way please share :-)
> 
> All the check is for in my template is to decide whether to display a
> couple of extra links in my menu block, which already changes based
> on whether a user is logged in. Checking for admin panels lets me do
> this simply. Is there another/better way to achieve this?
> 
> Best regards
> 
> Chris
> 

Depends what criteria you want to use, to decide whether to show those
links in the menu or not.

In general, you should try to use the most relevant security check (e.g.
if it's a link to some module admin function, use the security check for
that module function), so that if later you re-organise the privileges
for your site (e.g. with sub-admins for certain module functions), the
links will still be shown to the right people.

But if checking for AdminPanel privileges is close enough to what you
want, that's fine too :-)

Mike.