Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi Experts,
I am trying to set BackOffice login user either as administrator or editor (default) from my OnAutoLinking method
externalSignInAutoLink.OnAutoLinking = (BackOfficeIdentityUser user, ExternalLoginInfo info) => { var role = info.ExternalIdentity.FindFirst("http://schemas.microsoft.com/ws/2008/06/identity/claims/role"); if(role.Value == "ContentDesigner") { if (user.Roles.Count > 0) { user.Roles.Remove(new IdentityUserRole<string> { RoleId ="editor", UserId = "-2147483648" }); } user.AddRole("Admininstrator"); } else { user.AddRole("Editor"); }
Any pointers on how to remove default role and assign administrator. Is above method correct ? or is better way to do it ?
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Unable to remove default role for BackOffice user
Hi Experts,
I am trying to set BackOffice login user either as administrator or editor (default) from my OnAutoLinking method
Any pointers on how to remove default role and assign administrator. Is above method correct ? or is better way to do it ?
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.