1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-06 00:13:28 +00:00

PM-15091 Remove client side featureflag.AccessIntelligence and use DB feature flag (#12247)

* PM-15091 remove featureflag.AccessIntelligence

* removed unwanted lines of code

* fixed merge conflict
This commit is contained in:
Vijay Oommen
2024-12-05 11:24:51 -06:00
committed by GitHub
parent c11f429ddb
commit d6e1fe70ca
9 changed files with 12 additions and 10 deletions

View File

@@ -56,6 +56,7 @@ describe("ORGANIZATIONS state", () => {
allowAdminAccessToAllCollectionItems: false,
familySponsorshipLastSyncDate: new Date(),
userIsManagedByOrganization: false,
useRiskInsights: false,
},
};
const result = sut.deserializer(JSON.parse(JSON.stringify(expectedResult)));

View File

@@ -56,6 +56,7 @@ export class OrganizationData {
limitCollectionDeletion: boolean;
allowAdminAccessToAllCollectionItems: boolean;
userIsManagedByOrganization: boolean;
useRiskInsights: boolean;
constructor(
response?: ProfileOrganizationResponse,
@@ -116,6 +117,7 @@ export class OrganizationData {
this.limitCollectionDeletion = response.limitCollectionDeletion;
this.allowAdminAccessToAllCollectionItems = response.allowAdminAccessToAllCollectionItems;
this.userIsManagedByOrganization = response.userIsManagedByOrganization;
this.useRiskInsights = response.useRiskInsights;
this.isMember = options.isMember;
this.isProviderUser = options.isProviderUser;

View File

@@ -81,6 +81,7 @@ export class Organization {
* matches one of the verified domains of that organization, and the user is a member of it.
*/
userIsManagedByOrganization: boolean;
useRiskInsights: boolean;
constructor(obj?: OrganizationData) {
if (obj == null) {
@@ -137,6 +138,7 @@ export class Organization {
this.limitCollectionDeletion = obj.limitCollectionDeletion;
this.allowAdminAccessToAllCollectionItems = obj.allowAdminAccessToAllCollectionItems;
this.userIsManagedByOrganization = obj.userIsManagedByOrganization;
this.useRiskInsights = obj.useRiskInsights;
}
get canAccess() {

View File

@@ -35,6 +35,7 @@ export class OrganizationResponse extends BaseResponse {
limitCollectionCreation: boolean;
limitCollectionDeletion: boolean;
allowAdminAccessToAllCollectionItems: boolean;
useRiskInsights: boolean;
constructor(response: any) {
super(response);
@@ -75,5 +76,6 @@ export class OrganizationResponse extends BaseResponse {
this.allowAdminAccessToAllCollectionItems = this.getResponseProperty(
"AllowAdminAccessToAllCollectionItems",
);
this.useRiskInsights = this.getResponseProperty("UseRiskInsights");
}
}

View File

@@ -53,6 +53,7 @@ export class ProfileOrganizationResponse extends BaseResponse {
limitCollectionDeletion: boolean;
allowAdminAccessToAllCollectionItems: boolean;
userIsManagedByOrganization: boolean;
useRiskInsights: boolean;
constructor(response: any) {
super(response);
@@ -117,5 +118,6 @@ export class ProfileOrganizationResponse extends BaseResponse {
"AllowAdminAccessToAllCollectionItems",
);
this.userIsManagedByOrganization = this.getResponseProperty("UserIsManagedByOrganization");
this.useRiskInsights = this.getResponseProperty("UseRiskInsights");
}
}

View File

@@ -31,7 +31,6 @@ export enum FeatureFlag {
CipherKeyEncryption = "cipher-key-encryption",
VerifiedSsoDomainEndpoint = "pm-12337-refactor-sso-details-endpoint",
PM11901_RefactorSelfHostingLicenseUploader = "PM-11901-refactor-self-hosting-license-uploader",
AccessIntelligence = "pm-13227-access-intelligence",
PM14505AdminConsoleIntegrationPage = "pm-14505-admin-console-integration-page",
CriticalApps = "pm-14466-risk-insights-critical-application",
TrialPaymentOptional = "PM-8163-trial-payment",
@@ -81,7 +80,6 @@ export const DefaultFeatureFlagValue = {
[FeatureFlag.CipherKeyEncryption]: FALSE,
[FeatureFlag.VerifiedSsoDomainEndpoint]: FALSE,
[FeatureFlag.PM11901_RefactorSelfHostingLicenseUploader]: FALSE,
[FeatureFlag.AccessIntelligence]: FALSE,
[FeatureFlag.PM14505AdminConsoleIntegrationPage]: FALSE,
[FeatureFlag.CriticalApps]: FALSE,
[FeatureFlag.TrialPaymentOptional]: FALSE,