mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 00:03:56 +00:00
[refactor(Account Switching)] Implement StateService (#424)
This commit is contained in:
@@ -6,7 +6,7 @@ import { ApiService } from "jslib-common/abstractions/api.service";
|
||||
import { CipherService } from "jslib-common/abstractions/cipher.service";
|
||||
import { CryptoService } from "jslib-common/abstractions/crypto.service";
|
||||
import { FolderService } from "jslib-common/abstractions/folder.service";
|
||||
import { UserService } from "jslib-common/abstractions/user.service";
|
||||
import { StateService } from "jslib-common/abstractions/state.service";
|
||||
|
||||
import { Cipher } from "jslib-common/models/export/cipher";
|
||||
import { Collection } from "jslib-common/models/export/collection";
|
||||
@@ -31,7 +31,7 @@ export class CreateCommand {
|
||||
constructor(
|
||||
private cipherService: CipherService,
|
||||
private folderService: FolderService,
|
||||
private userService: UserService,
|
||||
private stateService: StateService,
|
||||
private cryptoService: CryptoService,
|
||||
private apiService: ApiService
|
||||
) {}
|
||||
@@ -100,7 +100,7 @@ export class CreateCommand {
|
||||
return Response.notFound();
|
||||
}
|
||||
|
||||
if (cipher.organizationId == null && !(await this.userService.canAccessPremium())) {
|
||||
if (cipher.organizationId == null && !(await this.stateService.getCanAccessPremium())) {
|
||||
return Response.error("Premium status is required to use this feature.");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user