initial commit
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
using Indotalent.ConfigBackEnd.Interfaces;
|
||||
using Indotalent.ConfigFrontEnd.Models;
|
||||
|
||||
namespace Indotalent.ConfigFrontEnd.Service;
|
||||
|
||||
public class CurrentUserService : ICurrentUserService
|
||||
{
|
||||
private readonly CurrentUserState _state;
|
||||
|
||||
public CurrentUserService(CurrentUserState state)
|
||||
{
|
||||
_state = state;
|
||||
}
|
||||
|
||||
public string? UserId
|
||||
{
|
||||
get => _state.UserId;
|
||||
set => _state.UserId = value;
|
||||
}
|
||||
|
||||
public string? UserName
|
||||
{
|
||||
get => _state.UserName;
|
||||
set => _state.UserName = value;
|
||||
}
|
||||
|
||||
public string? Email
|
||||
{
|
||||
get => _state.Email;
|
||||
set => _state.Email = value;
|
||||
}
|
||||
|
||||
public string? FullName
|
||||
{
|
||||
get => _state.FullName;
|
||||
set => _state.FullName = value;
|
||||
}
|
||||
|
||||
public Task<bool> IsInRoleAsync(string role)
|
||||
{
|
||||
return Task.FromResult(false);
|
||||
}
|
||||
|
||||
public Task<bool> HasPermissionAsync(string permission)
|
||||
{
|
||||
return Task.FromResult(false);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user