In SharePoint Portal Server 2003 you may have needed to impersonate a user with higher priveledges than the current user executing the code. You did this using WindowsIdentity.Impersonate() method. In SharePoint 2007 and WSS V3 you have SPSecurity.RunWithElevatedPrivileges call. The code looks like:
SPSecurity.RunWithElevatedPrivileges(delegate() {
// put your code here. any code within
Read the complete post at http://dhunter-thinkingoutaloud.blogspot.com/2007/07/sharepoint-2007-running.html