task full updated - fixed connectedPersonnel
This commit is contained in:
@@ -422,4 +422,28 @@ public class AccountApplication : IAccountApplication
|
||||
{
|
||||
return _accountRepository.GetAccountLowerPositionvalue();
|
||||
}
|
||||
|
||||
public OperationResult ReLogin()
|
||||
{
|
||||
var prAcc = _authHelper.CurrentAccountInfo();
|
||||
var operation = new OperationResult();
|
||||
var account = _accountRepository.GetIncludePositions(prAcc.Id);
|
||||
if (account == null)
|
||||
return operation.Failed("این اکانت وجود ندارد");
|
||||
|
||||
|
||||
|
||||
var permissions = _roleRepository.Get(account.RoleId)
|
||||
.Permissions
|
||||
.Select(x => x.Code)
|
||||
.ToList();
|
||||
|
||||
|
||||
_authHelper.SignOut();
|
||||
var authViewModel = new AuthViewModel(account.id, account.RoleId, account.Fullname
|
||||
, account.Username, account.Mobile, account.ProfilePhoto, permissions, account.RoleName, account.AdminAreaPermission, account.ClientAriaPermission, account.Position.PositionValue);
|
||||
_authHelper.Signin(authViewModel);
|
||||
return operation.Succcedded(2);
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user