Skip to content
Merged
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
4 changes: 2 additions & 2 deletions .github/workflows/acceptance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,10 @@ jobs:

# Use `.python-version` to avoid duplication
# XXX: can't actually read from .python-version because GitHub Actions
# does not support our version (2.7.16)
# does not support our version (2.7.18)
- name: Get python version from `.python-version`
id: python-version
run: echo "::set-output name=version::2.7.17"
run: echo "::set-output name=version::2.7.18"

# setup python
- name: Set up Python ${{ steps.python-version.outputs.version }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,8 @@ class DataPrivacyRules extends React.Component<Props, State> {
<div>{t('Data Privacy Rules')}</div>
</PanelHeader>
<PanelAlert type="info">
{`${additionalContext} ${t(
'The new rules will only apply to upcoming events. '
)}`}{' '}
{additionalContext}{' '}
{`${t('The new rules will only apply to upcoming events. ')}`}{' '}
{tct('For more details, see [linkToDocs].', {
linkToDocs: (
<ExternalLink href={ADVANCED_DATASCRUBBING_LINK}>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import {RouteComponentProps} from 'react-router/lib/Router';
import PropTypes from 'prop-types';

import {t} from 'app/locale';
import SettingsPageHeader from 'app/views/settings/components/settingsPageHeader';
Expand All @@ -11,25 +10,14 @@ import {Organization} from 'app/types';
import {addErrorMessage} from 'app/actionCreators/indicator';
import {updateOrganization} from 'app/actionCreators/organizations';
import organizationSecurityAndPrivacy from 'app/data/forms/organizationSecurityAndPrivacy';
import SentryTypes from 'app/sentryTypes';

import DataPrivacyRules from '../components/dataPrivacyRules/dataPrivacyRules';

type Props = {
type Props = RouteComponentProps<{orgId: string; projectId: string}, {}> & {
organization: Organization;
params: {
orgId: string;
projectId: string;
};
} & RouteComponentProps<{}, {}>;
};

class OrganizationSecurityAndPrivacyContent extends AsyncView<Props> {
static contextTypes = {
organization: SentryTypes.Organization,
// left router contextType to satisfy the compiler
router: PropTypes.object,
};

getEndpoints(): ReturnType<AsyncView['getEndpoints']> {
const {orgId} = this.props.params;
return [
Expand All @@ -45,7 +33,7 @@ class OrganizationSecurityAndPrivacyContent extends AsyncView<Props> {
};

renderBody() {
const {organization} = this.context;
const {organization} = this.props;
const {orgId} = this.props.params;
const {authProvider} = this.state;
const initialData = this.props.organization;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import Feature from 'app/components/acl/feature';
import FeatureDisabled from 'app/components/acl/featureDisabled';
import {PanelAlert} from 'app/components/panels';
import {t} from 'app/locale';
import {Organization} from 'app/types';

import ProjectDataPrivacyContent from './projectDataPrivacyContent';

const ProjectDataPrivacy = ({organization}: {organization: Organization}) => (
type Props = ProjectDataPrivacyContent['props'];

const ProjectDataPrivacy = ({organization, ...props}: Props) => (
<Feature
features={['datascrubbers-v2']}
organization={organization}
Expand All @@ -20,7 +21,7 @@ const ProjectDataPrivacy = ({organization}: {organization: Organization}) => (
/>
)}
>
<ProjectDataPrivacyContent />
<ProjectDataPrivacyContent {...props} organization={organization} />
</Feature>
);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import PropTypes from 'prop-types';
import {RouteComponentProps} from 'react-router/lib/Router';

import Link from 'app/components/links/link';
import {t, tct} from 'app/locale';
Expand All @@ -9,25 +9,23 @@ import Form from 'app/views/settings/components/forms/form';
import {fields} from 'app/data/forms/projectGeneralSettings';
import AsyncView from 'app/views/asyncView';
import ProjectActions from 'app/actions/projectActions';
import SentryTypes from 'app/sentryTypes';
import {Organization, Project} from 'app/types';

import DataPrivacyRules from '../components/dataPrivacyRules/dataPrivacyRules';

class ProjectDataPrivacyContent extends AsyncView<{}> {
static contextTypes = {
organization: SentryTypes.Organization,
project: SentryTypes.Project,
// left the router contextType to satisfy the compiler
router: PropTypes.object,
};
type Props = RouteComponentProps<{orgId: string; projectId: string}, {}> & {
organization: Organization;
project: Project;
};

class ProjectDataPrivacyContent extends AsyncView<Props> {
getEndpoints(): ReturnType<AsyncView['getEndpoints']> {
const {organization, project} = this.context;
const {organization, project} = this.props;
return [['data', `/projects/${organization.slug}/${project.slug}/`]];
}

renderBody() {
const {organization, project} = this.context;
const {organization, project} = this.props;
const initialData = this.state.data;
const endpoint = `/projects/${organization.slug}/${project.slug}/`;
const access = new Set(organization.access);
Expand Down