Interface IAuthorizationHelper
Utility class for working with policy authorizers.
Namespace: Umbraco.Cms.Core.Security.Authorization
Assembly: Umbraco.Core.dll
Syntax
public interface IAuthorizationHelper
Methods
View SourceGetUmbracoUser(IPrincipal)
Converts an System.Security.Principal.IPrincipal into an IUser.
Declaration
IUser GetUmbracoUser(IPrincipal currentUser)
Parameters
| Type | Name | Description |
|---|---|---|
| IPrincipal | currentUser | The current user's principal. |
Returns
| Type | Description |
|---|---|
| IUser |
TryGetUmbracoUser(IPrincipal, out IUser?)
Attempts to convert an System.Security.Principal.IPrincipal into an IUser.
Declaration
bool TryGetUmbracoUser(IPrincipal currentUser, out IUser? user)
Parameters
| Type | Name | Description |
|---|---|---|
| IPrincipal | currentUser | The current user's principal. |
| IUser | user | The resulting IUser, if the conversion is successful. |
Returns
| Type | Description |
|---|---|
| bool | True if the conversion is successful, false otherwise |