View Single Post
  #2 (permalink)  
Old 02-07-2008, 11:55 AM
pwiesner pwiesner is offline
Senior Member
 
Join Date: Mar 2007
Posts: 158
Default

Most of the Checkbox API methods take an IAccessPermissible object as a parameter; it is used to gate access. The following code example demonstrates how to obtain an ExtendedPrincipal object, which is a concrete implementation of the IAccessPermissible interface, and the current users default language.

Code:
ExtendedPrincipal currentPrincipal = (ExtendedPrincipal)UserManager.GetCurrentPrincipal();
string language =  WebTextManager.GetUserLanguage();

ResponseTemplate newSurvey = ResponseTemplateManager.CopyTemplate(templateId, currentPrincipal, language);
Reply With Quote