1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 15:42:48 -05:00

[PM-16700] Handling nulls in UserLicenseClaimsFactory (#5217)

* Handling nulls in UserLicenseClaimsFactory

* Only setting Token if the flag is enabled
This commit is contained in:
Conner Turnbull
2025-01-03 15:34:29 -05:00
committed by GitHub
parent 4b2030de77
commit f74b94b5f7
2 changed files with 26 additions and 7 deletions

View File

@ -1143,7 +1143,10 @@ public class UserService : UserManager<User>, IUserService, IDisposable
? new UserLicense(user, _licenseService)
: new UserLicense(user, subscriptionInfo, _licenseService);
if (_featureService.IsEnabled(FeatureFlagKeys.SelfHostLicenseRefactor))
{
userLicense.Token = await _licenseService.CreateUserTokenAsync(user, subscriptionInfo);
}
return userLicense;
}