Microsoft Content Management Server - Hiding Submit hyperlink

This is Interesting: Free IT Magazines  
Home > Archive > Microsoft Content Management Server > March 2004 > Hiding Submit hyperlink





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Hiding Submit hyperlink
Elena

2004-03-01, 12:35 pm

I would like to know if somebody could tell me which code is needed to
hide the Web Author 'Sumbit' Hyperlink when the logged user is an
Administrator.
Thanks in advance
Regards


Elena
Stefan [MSFT]

2004-03-01, 12:35 pm

Hi Elena,

this is not very easy to implement as there is no easy way to check if an
user is an administrator.
The best way to test this is to create a channel and not to assign any user
groups to this channel.
Then do search for this channel. If you are able to retrieve it you are an
administrator as only an admin is able to see channels with no user roles
assigned.

So the test would be similar to the following:

<% if
(CmsHttpContext.Current.Searches.GetByPath("/Channels/AdminOnlyChannel") ==
null) { %>

.... submit code in defaultconsole.ascx

<% } %>

Cheers,
Stefan.

--
This posting is provided "AS IS" with no warranties, and confers no rights.


"Elena" <ELEMA.LO@terra.es> wrote in message
news:2fa48a0d.0403010842.62bdb7c5@posting.google.com...
> I would like to know if somebody could tell me which code is needed to
> hide the Web Author 'Sumbit' Hyperlink when the logged user is an
> Administrator.
> Thanks in advance
> Regards
>
>
> Elena



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com