Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set tenant admin's password from host side #14597

Merged
merged 5 commits into from
Nov 10, 2022

Conversation

malikmasis
Copy link
Contributor

@malikmasis malikmasis commented Nov 10, 2022

@@ -301,4 +302,13 @@ public override async Task<IQueryable<IdentityUser>> WithDetailsAsync()
{
return (await GetQueryableAsync()).IncludeDetails();
}

public virtual async Task<IdentityUser> GetUserByTenantIdAndUserNameAsync(Guid tenantId, [NotNull] string userName, bool includeDetails = true, CancellationToken cancellationToken = default)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • You've declared, but not used the includeDetails parameter. See other similar methods to understand how to use.
  • If a method may return null, then its name should start with Find, not Get
  • A good naming can be FindByTenantIdAndUserNameAsync. Don't use User, we are already in the user context.

@@ -102,4 +102,11 @@ public interface IIdentityUserRepository : IBasicRepository<IdentityUser, Guid>
bool? notActive = null,
CancellationToken cancellationToken = default
);

Task<IdentityUser> FindByTenantIdAndUserNameAsync(
Guid tenantId,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make the tenantId nullable, so the method can be used for host users too.

@hikalkan hikalkan merged commit f5a6d5b into dev Nov 10, 2022
@hikalkan hikalkan deleted the saas-tenant-admin-password-12067 branch November 10, 2022 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants