Skip to content

Commit dd7b577

Browse files
authored
Merge pull request #61 from back4app/hide-security-settings-gdpr-fields
Hide security settings gdpr fields
2 parents 706a1a9 + 0c0c902 commit dd7b577

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/dashboard/Settings/SecuritySettings.react.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,11 @@ export default class SecuritySettings extends DashboardView {
101101
<Field
102102
label={<Label text='File key' description='Use this key when migrating to your own Parse Server to ensure your new server has access to existing files.' />}
103103
input={<KeyField name='File' hidden={true}>{currentApp.fileKey}</KeyField>} />
104-
<Field
105-
label={<Label text='Master key' description='Using this key overrides all permissions. Not usable on client SDKs. Keep it secret!' />}
106-
input={<KeyField name='Master' hidden={true}>{currentApp.masterKey}</KeyField>} />
104+
{(!currentApp.custom.isGDPR || currentApp.custom.forceShowGDPRFields) &&
105+
<Field
106+
label={<Label text='Master key' description='Using this key overrides all permissions. Not usable on client SDKs. Keep it secret!' />}
107+
input={<KeyField name='Master' hidden={true}>{currentApp.masterKey}</KeyField>} />
108+
}
107109
</Fieldset>
108110
{/*<Fieldset legend='Reset Master Key' description='Use this when your key has been compromised.'>*/}
109111
{/*<Field*/}

src/lib/ParseApp.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ export default class ParseApp {
4242
primaryBackgroundColor,
4343
secondaryBackgroundColor,
4444
supportedPushLocales,
45-
feedbackEmail
45+
feedbackEmail,
46+
custom
4647
}) {
4748
this.name = appName;
4849
this.feedbackEmail = feedbackEmail;
@@ -67,6 +68,7 @@ export default class ParseApp {
6768
this.primaryBackgroundColor=primaryBackgroundColor;
6869
this.secondaryBackgroundColor=secondaryBackgroundColor;
6970
this.supportedPushLocales = supportedPushLocales ? supportedPushLocales : [];
71+
this.custom = custom;
7072

7173
if(!supportedPushLocales) {
7274
console.warn(`Missing push locales for '` + appName + `', see this link for details on setting localizations up. https://github.com/parse-community/parse-dashboard#configuring-localized-push-notifications`);

0 commit comments

Comments
 (0)