Example #1
0
 /// <summary>
 /// Handles the GetRoles event of the roleManager control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="System.Web.Security.RoleManagerEventArgs"/> instance containing the event data.</param>
 private void roleManager_GetRoles(object sender, RoleManagerEventArgs e)
 {
     if (this.application.User is OAuthPrincipal)
     {
         e.RolesPopulated = true;
     }
 }
 // http://stackoverflow.com/questions/1727960/how-to-keep-roleprovider-from-overriding-custom-roles
 private void roleManager_GetRoles(object sender, RoleManagerEventArgs e)
 {
     if (_Context.User is UserPrincipal)
     {
         e.RolesPopulated = true;             // allows roles set in AuthenticateUser to stick.
     }
 }
Example #3
0
 /// <summary>
 /// Handles the GetRoles event of the roleManager control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="System.Web.Security.RoleManagerEventArgs"/> instance containing the event data.</param>
 private void roleManager_GetRoles(object sender, RoleManagerEventArgs e)
 {
     if (this.application.User is DotNetOpenAuth.OAuth.ChannelElements.OAuthPrincipal)
     {
         e.RolesPopulated = true;
     }
 }