View Source
Class BackOfficeSecurity
Inheritance
System.Object
Assembly: Umbraco.Web.Common.dll
Syntax
public class BackOfficeSecurity : IBackOfficeSecurity
Constructors
View Source
BackOfficeSecurity(IUserService, IHttpContextAccessor)
Declaration
public BackOfficeSecurity(IUserService userService, IHttpContextAccessor httpContextAccessor)
Parameters
Type |
Name |
Description |
IUserService |
userService |
|
Microsoft.AspNetCore.Http.IHttpContextAccessor |
httpContextAccessor |
|
Properties
View Source
CurrentUser
Declaration
public IUser? CurrentUser { get; }
Property Value
Type |
Description |
System.Nullable<IUser> |
|
Methods
View Source
GetUserId()
Declaration
public Attempt<int> GetUserId()
Returns
Type |
Description |
Attempt<System.Int32> |
|
View Source
IsAuthenticated()
Declaration
public bool IsAuthenticated()
Returns
Type |
Description |
System.Boolean |
|
View Source
UserHasSectionAccess(String, IUser)
Declaration
public bool UserHasSectionAccess(string section, IUser user)
Parameters
Type |
Name |
Description |
System.String |
section |
|
IUser |
user |
|
Returns
Type |
Description |
System.Boolean |
|