mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 09:13:33 +00:00
Use sync instead of token to manage emailVerified (#344)
This commit is contained in:
@@ -17,7 +17,6 @@ import { MessagingService } from '../../../abstractions/messaging.service';
|
||||
import { PlatformUtilsService } from '../../../abstractions/platformUtils.service';
|
||||
import { PolicyService } from '../../../abstractions/policy.service';
|
||||
import { SendService } from '../../../abstractions/send.service';
|
||||
import { TokenService } from '../../../abstractions/token.service';
|
||||
import { UserService } from '../../../abstractions/user.service';
|
||||
|
||||
import { SendFileView } from '../../../models/view/sendFileView';
|
||||
@@ -83,8 +82,7 @@ export class AddEditComponent implements OnInit {
|
||||
constructor(protected i18nService: I18nService, protected platformUtilsService: PlatformUtilsService,
|
||||
protected environmentService: EnvironmentService, protected datePipe: DatePipe,
|
||||
protected sendService: SendService, protected userService: UserService,
|
||||
protected messagingService: MessagingService, protected policyService: PolicyService,
|
||||
protected tokenService: TokenService) {
|
||||
protected messagingService: MessagingService, protected policyService: PolicyService) {
|
||||
this.typeOptions = [
|
||||
{ name: i18nService.t('sendTypeFile'), value: SendType.File },
|
||||
{ name: i18nService.t('sendTypeText'), value: SendType.Text },
|
||||
@@ -174,7 +172,7 @@ export class AddEditComponent implements OnInit {
|
||||
});
|
||||
|
||||
this.canAccessPremium = await this.userService.canAccessPremium();
|
||||
this.emailVerified = this.tokenService.getEmailVerified();
|
||||
this.emailVerified = await this.userService.getEmailVerified();
|
||||
if (!this.canAccessPremium || !this.emailVerified) {
|
||||
this.type = SendType.Text;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user