Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am developing a complete custom SharePoint Portal... We are using C# & ASP .NET to create the webparts.

I want to create seperate landing pages for ADMIN & NORMAL USER.... How do i achieve this using custom code.

One of the Ideas I have is. Create a empty landing page & add a empty Webpart on that page & this webpart will be having the code to do the following: - Read the detailes of logged in user using SP API's - Check if he is part of ADMIN or NORMAL USER group in SharePoint. - If he is part of ADMIN then redirect him to pa

share|improve this question
add comment

2 Answers

The proper way to do this is "Security Trimmed Controls" read here for a good guide on usage. They are extremely simple, basically you only include in what the use has permission to see. This will be perfect for what you want.

You can use it to even include a different style sheet, different web-parts, change almost anything, just from permissions.

share|improve this answer
add comment

First thought, is why cant you just give your Admins training as to where to go or just a link to take them to the admin homepage? Keep it simple.

However if you want to go down the coding route then I would take a hybrid approach of your original idea and Hugh's.

Create the homepage for your 'normal' user and then create your 'admin redirect' user control that redirects the administrator to the admin homepage. You could then wrap the security trimmed control around the 'admin redirect' user control and add it to the 'normal' users homepage so that it is only called for administrators.

This will give you the following benefits.

  1. Less processing overhead for your normal users
  2. Separate the pages so that its not confusing to your users or for that matter the developers. This will reduce the load on the page for both types of users as there will be less processing of the security trimmed controls. Also less likely are bugs going to be introduced.
  3. Finally you can secure the page so that only admins can browse to it.

Cheers Simon

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.