Wednesday, 6 August 2008

Restrict Access to MOSS Customizations

If we need to make sure that a user is logged in before accessing our customizations in MOSS and then redirected back after login, I found a inbuilt way

Microsoft.SharePoint.Utilities.SPUtility.EnsureAuthentication();
This will redirect unauthenticated users to the login screen and show users access denied screens if applicable.

It's that simple.

No comments: