public virtual Task RemoveRoleFromOrganizationUnitAsync(IdentityRole role, OrganizationUnit organizationUnit) { organizationUnit.RemoveRole(role.Id); return(OrganizationUnitRepository.UpdateAsync(organizationUnit)); }
public virtual async Task UpdateAsync(OrganizationUnit organizationUnit) { await ValidateOrganizationUnitAsync(organizationUnit); await OrganizationUnitRepository.UpdateAsync(organizationUnit); }
public virtual Task <bool> IsInOrganizationUnitAsync(IdentityUser user, OrganizationUnit ou) { return(Task.FromResult(user.IsInOrganizationUnit(ou.Id))); }
public virtual async Task RemoveFromOrganizationUnitAsync(IdentityUser user, OrganizationUnit ou) { await IdentityUserRepository.EnsureCollectionLoadedAsync(user, u => u.OrganizationUnits, CancellationTokenProvider.Token); user.RemoveOrganizationUnit(ou.Id); }
public virtual async Task <bool> IsInOrganizationUnitAsync(IdentityUser user, OrganizationUnit ou) { await IdentityUserRepository.EnsureCollectionLoadedAsync(user, u => u.OrganizationUnits, CancellationTokenProvider.Token); return(user.IsInOrganizationUnit(ou.Id)); }
public virtual Task RemoveRoleFromOrganizationUnitAsync(IdentityRole role, OrganizationUnit organizationUnit) { organizationUnit.RemoveRole(role.Id); return(Task.FromResult(0)); }
public async Task GetAllChildrenWithParentCodeAsync() { (await _organizationUnitRepository.GetAllChildrenWithParentCodeAsync(OrganizationUnit.CreateCode(0), _guidGenerator.Create())).ShouldNotBeNull(); }