DocSas/PropertyService.Domain/ModelView/Users/UserProvider.cs
/// <summary>
/// has management rights as an asynchronous operation.
/// </summary>
/// <param name="userVM">The user vm.</param>
/// <returns>Task&lt;DSCResponse&gt;.</returns>
has management rights as an asynchronous operation.
has management rights as an asynchronous operation .
public async Task<DSCResponse> HasManagementRightsAsync(UserVM userVM)
        {
            var msg = new Dictionary<string, string>();
            var response = new DSCResponse();
            var isSuccess = false;
            var user = await _appCommon.GetUserAsync(userVM.Id);
            if (user != null && userVM.LoginSessionId.HasValue && userVM.LoginSessionId == userVM.LoginSessionId)
            {
                var roleResponse = await _appCommon.GetUserRoleAsync(user);
                var roleVM = roleResponse.ResponseData as AvailableRoleVM;
                if (roleVM != null)
                {
                    isSuccess = roleVM.HasManagementRights;
                }
            }
            response.ResponseData = isSuccess;
            return response;
        }
public async Task < DSCResponse > HasManagementRightsAsync ( UserVM userVM ) { var msg = new Dictionary < string , string > ( ) ; var response = new DSCResponse ( ) ; var isSuccess = false ; var user = await _appCommon . GetUserAsync ( userVM . Id ) ; if ( user != null && userVM . LoginSessionId . HasValue && userVM . LoginSessionId == userVM . LoginSessionId ) { var roleResponse = await _appCommon . GetUserRoleAsync ( user ) ; var roleVM = roleResponse . ResponseData as AvailableRoleVM ; if ( roleVM != null ) { isSuccess = roleVM . HasManagementRights ; } } response . ResponseData = isSuccess ; return response ; }
has management rights as an asynchronous operation.
has management rights as an asynchronous operation .
None
userVM
UserVM
The user vm.
The user vm .