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

release 2.50.0 #5523

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@ The types of changes are:



## [Unreleased](https://github.com/ethyca/fides/compare/2.49.1...2.50.0)
## [2.50.0](https://github.com/ethyca/fides/compare/2.49.1...2.50.0)

### Added
- Added namespace support for Snowflake [#5486](https://github.com/ethyca/fides/pull/5486)
- Added support for field-level masking overrides [#5446](https://github.com/ethyca/fides/pull/5446)
- Added BigQuery Enterprise access request integration test [#5504](https://github.com/ethyca/fides/pull/5504)
- Added MD5 email hashing for Segment's Right to Forget endpoint requests [#5514](https://github.com/ethyca/fides/pull/5514)
- Added loading state to the toggle switches on the Privacy experiences page [#5529](https://github.com/ethyca/fides/pull/5529)
- Added new env variable to set a privacy center to default to a specific property [#5532](https://github.com/ethyca/fides/pull/5532)

### Changed
- Allow hiding systems via a `hidden` parameter and add two flags on the `/system` api endpoint; `show_hidden` and `dnd_relevant`, to display only systems with integrations [#5484](https://github.com/ethyca/fides/pull/5484)
Expand All @@ -51,6 +53,8 @@ The types of changes are:
- Fixed position of "Integration" button on system detail page [#5497](https://github.com/ethyca/fides/pull/5497)
- Fixing issue where "privacy request received" emails would not be sent if the request had custom identities [#5518](https://github.com/ethyca/fides/pull/5518)
- Fixed issue with long-running privacy request tasks losing their connection to the database [#5500](https://github.com/ethyca/fides/pull/5500)
- Fixed missing "Manage privacy preferences" button label option in TCF experience translations [#5528](https://github.com/ethyca/fides/pull/5528)
- Fixed privacy center not fetching the correct experience when using custom property paths [#5532](https://github.com/ethyca/fides/pull/5532)

### Docs
- Added docs for PrivacyNoticeRegion type [#5488](https://github.com/ethyca/fides/pull/5488)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ The Fides core team is committed to providing a variety of documentation to help

For more information on getting started with Fides, how to configure and set up Fides, and more about the Fides ecosystem of open source projects:

* Documentation: <https://docs.ethyca.com>
* Documentation: <https://ethyca.com/docs>
* Website: www.ethyca.com/fides

### Support
Expand Down
12 changes: 9 additions & 3 deletions clients/admin-ui/src/features/privacy-experience/cells.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CellContext } from "@tanstack/react-table";
import React from "react";
import React, { useState } from "react";

import { DefaultCell, EnableCell } from "~/features/common/table/v2/cells";
import { COMPONENT_MAP } from "~/features/privacy-experience/constants";
Expand All @@ -17,12 +17,17 @@ export const EnablePrivacyExperienceCell = ({
}: CellContext<ExperienceConfigListViewResponse, boolean | undefined>) => {
const [limitedPatchExperienceMutationTrigger] =
useLimitedPatchExperienceConfigMutation();
const [isLoading, setIsLoading] = useState(false);

const onToggle = async (toggle: boolean) =>
limitedPatchExperienceMutationTrigger({
const onToggle = async (toggle: boolean) => {
setIsLoading(true);
const response = await limitedPatchExperienceMutationTrigger({
id: row.original.id,
disabled: !toggle,
});
setIsLoading(false);
return response;
};

const disabled = getValue()!;
const { regions } = row.original;
Expand All @@ -41,6 +46,7 @@ export const EnablePrivacyExperienceCell = ({
onToggle={onToggle}
title={title}
message={message}
loading={isLoading}
/>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ export const getTranslationFormFields = (
acknowledge_button_label: { included: true, required: true },
privacy_policy_link_label: { included: true },
privacy_policy_url: { included: true },
privacy_preferences_link_label: { included: true, required: true },
modal_link_label: { included: true },
};
}
Expand Down
10 changes: 9 additions & 1 deletion clients/privacy-center/app/server-environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ export const loadServerSettings = (): PrivacyCenterServerSettings => {
// eslint-disable-next-line no-underscore-dangle,@typescript-eslint/naming-convention

export const loadPrivacyCenterEnvironment = async ({
customPropertyPath = undefined,
customPropertyPath,
}: { customPropertyPath?: string } = {}): Promise<PrivacyCenterEnvironment> => {
if (typeof window !== "undefined") {
throw new Error(
Expand All @@ -307,6 +307,14 @@ export const loadPrivacyCenterEnvironment = async ({
if (result) {
property = result;
}
} else if (settings.FIDES_PRIVACY_CENTER__ROOT_PROPERTY_PATH) {
const result = await getPropertyFromUrl({
customPropertyPath: settings.FIDES_PRIVACY_CENTER__ROOT_PROPERTY_PATH,
fidesApiUrl: settings.SERVER_SIDE_FIDES_API_URL || settings.FIDES_API_URL,
});
if (result) {
property = result;
}
}

// Load configuration file (if it exists)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export interface PrivacyCenterSettings {
CONFIG_JSON_URL: string; // e.g. file:///app/config/config.json
SHOW_BRAND_LINK: boolean; // whether to render the Ethyca brand link
CUSTOM_PROPERTIES: boolean; // (optional) (default: true) enables the use of a single privacy center instance to serve different properties on different paths with custom configs
FIDES_PRIVACY_CENTER__ROOT_PROPERTY_PATH: string | null; // (optional) setting this will fetch a property when navigating the root ("/") path.

// Fides.js options
DEBUG: boolean; // whether console logs are enabled for consent components
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ const loadEnvironmentVariables = () => {
"file:///app/config/config.css",
SHOW_BRAND_LINK:
process.env.FIDES_PRIVACY_CENTER__SHOW_BRAND_LINK === "true" || false,
CUSTOM_PROPERTIES: process.env.CUSTOM_PROPERTIES === "true" || true,
CUSTOM_PROPERTIES: process.env.CUSTOM_PROPERTIES !== "false", // default: true
FIDES_PRIVACY_CENTER__ROOT_PROPERTY_PATH:
process.env.FIDES_PRIVACY_CENTER__ROOT_PROPERTY_PATH || null,

// Overlay options
DEBUG: process.env.FIDES_PRIVACY_CENTER__DEBUG
Expand Down
3 changes: 2 additions & 1 deletion clients/privacy-center/features/common/property.slice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ export const propertySlice = createSlice({
});

const selectProperty = (state: RootState) => state.property;

export const selectPropertyId = (state: RootState) =>
state.property?.property?.id;
export const { reducer } = propertySlice;
export const { loadProperty } = propertySlice.actions;
export const useProperty = (): Property | undefined => {
Expand Down
17 changes: 12 additions & 5 deletions clients/privacy-center/features/consent/consent.slice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ import {
PrivacyExperienceResponse,
PrivacyNoticeRegion,
PrivacyPreferencesRequest,
Property,
RecordConsentServedRequest,
} from "~/types/api";

import { selectPropertyId } from "../common/property.slice";
import { selectSettings } from "../common/settings.slice";
import { FidesKeyToConsent } from "./types";

Expand Down Expand Up @@ -73,7 +75,7 @@ export const consentApi = baseApi.injectEndpoints({
}),
getPrivacyExperience: build.query<
PagePrivacyExperienceResponse,
{ region: PrivacyNoticeRegion }
{ region: PrivacyNoticeRegion; property_id: Property["id"] }
>({
query: (payload) => ({
url: "privacy-experience/",
Expand Down Expand Up @@ -236,21 +238,26 @@ export const selectUserRegion = createSelector(
settings.GEOLOCATION_API_URL,
)(RootState)?.data;
}

return constructFidesRegionString(geolocation) as PrivacyNoticeRegion;
}
return undefined;
},
);

export const selectPrivacyExperience = createSelector(
[(RootState) => RootState, selectUserRegion, selectFidesUserDeviceId],
(RootState, region) => {
[
(RootState) => RootState,
selectUserRegion,
selectFidesUserDeviceId,
selectPropertyId,
],
(RootState, region, _deviceId, propertyId) => {
if (!region) {
return undefined;
}
return consentApi.endpoints.getPrivacyExperience.select({
region,
})(RootState)?.data?.items[0];
property_id: propertyId,
})(RootState).data?.items[0];
},
);
4 changes: 3 additions & 1 deletion clients/privacy-center/features/consent/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
} from "~/features/common/settings.slice";
import { PrivacyNoticeRegion } from "~/types/api";

import { selectPropertyId } from "../common/property.slice";
import {
selectUserRegion,
useGetPrivacyExperienceQuery,
Expand All @@ -26,7 +27,6 @@ import {
*/
export const useSubscribeToPrivacyExperienceQuery = () => {
const { IS_GEOLOCATION_ENABLED, GEOLOCATION_API_URL } = useSettings();

const skipFetchExperience = !useAppSelector(selectIsNoticeDriven);
const skipFetchGeolocation =
skipFetchExperience || !IS_GEOLOCATION_ENABLED || !GEOLOCATION_API_URL;
Expand All @@ -36,9 +36,11 @@ export const useSubscribeToPrivacyExperienceQuery = () => {
});

const region = useAppSelector(selectUserRegion);
const propertyId = useAppSelector(selectPropertyId);
const params = {
// Casting should be safe because we skip in the hook below if region does not exist
region: region as PrivacyNoticeRegion,
property_id: propertyId,
};
useGetPrivacyExperienceQuery(params, {
skip: !region || skipFetchExperience,
Expand Down
Loading
Loading