Skip to content

Commit e24e33d

Browse files
committed
Merge pull request #22 from ParsePlatform/remove-gks
Remove gatekeeper
2 parents 28802da + e575600 commit e24e33d

File tree

9 files changed

+92
-116
lines changed

9 files changed

+92
-116
lines changed

components/ExplorerQueryComposer/ExplorerQueryComposer.react.js

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,18 @@
55
* This source code is licensed under the license found in the LICENSE file in
66
* the root directory of this source tree.
77
*/
8-
import base from 'stylesheets/base.scss';
9-
import Button from 'components/Button/Button.react';
10-
import check_gatekeeper from 'lib/check_gatekeeper';
11-
import ChromeDropdown from 'components/ChromeDropdown/ChromeDropdown.react';
12-
import DateTimeEntry from 'components/DateTimeEntry/DateTimeEntry.react';
8+
import base from 'stylesheets/base.scss';
9+
import Button from 'components/Button/Button.react';
10+
import ChromeDropdown from 'components/ChromeDropdown/ChromeDropdown.react';
11+
import DateTimeEntry from 'components/DateTimeEntry/DateTimeEntry.react';
1312
import {
1413
Constraints,
1514
FieldConstraints
1615
} from 'components/ExplorerQueryComposer/ExplorerFilter';
17-
import PropTypes from 'lib/PropTypes';
18-
import React from 'react';
19-
import ReactDOM from 'react-dom';
20-
import styles from 'components/ExplorerQueryComposer/ExplorerQueryComposer.scss';
16+
import PropTypes from 'lib/PropTypes';
17+
import React from 'react';
18+
import ReactDOM from 'react-dom';
19+
import styles from 'components/ExplorerQueryComposer/ExplorerQueryComposer.scss';
2120

2221
const TABLE_SOURCES_LABEL = ['API Event', 'Custom Event'];
2322

@@ -67,7 +66,7 @@ const FIELD_TYPE = {
6766
'Request Type' : 'String',
6867
'Class' : 'String',
6968
'Event Name' : 'String',
70-
'Dimensions' : check_gatekeeper('explorer_json_scalar') ? 'JSON' : 'String',
69+
'Dimensions' : false ? 'JSON' : 'String', //In progress features. Change false to true to work on this feature.
7170
'Installation ID' : 'String',
7271
'Parse User ID' : 'String',
7372
'Parse SDK' : 'String',

dashboard/Dashboard.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import AppData from './AppData.react';
1313
import AppsIndex from './Apps/AppsIndex.react';
1414
import AppsManager from 'lib/AppsManager';
1515
import Browser from './Data/Browser/Browser.react';
16-
import check_gatekeeper from 'lib/check_gatekeeper';
1716
import CloudCode from './Data/CloudCode/CloudCode.react';
1817
import Config from './Data/Config/Config.react';
1918
import Explorer from './Analytics/Explorer/Explorer.react';
@@ -215,7 +214,7 @@ class Dashboard extends React.Component {
215214
<Route path='apps/:appId' component={AppData}>
216215
<Route path='getting_started' component={Empty} />
217216

218-
<Route path='browser' component={check_gatekeeper('schema_overview') ? SchemaOverview : Browser} />
217+
<Route path='browser' component={false ? SchemaOverview : Browser} /> //In progress features. Change false to true to work on this feature.
219218
<Route path='browser/:className' component={Browser} />
220219

221220
<Route path='cloud_code' component={CloudCode} />

dashboard/DashboardView.react.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@
55
* This source code is licensed under the license found in the LICENSE file in
66
* the root directory of this source tree.
77
*/
8-
import check_gatekeeper from 'lib/check_gatekeeper';
9-
import ParseApp from 'lib/ParseApp';
10-
import React from 'react';
11-
import Sidebar from 'components/Sidebar/Sidebar.react';
12-
import SidebarToggle from 'components/Sidebar/SidebarToggle.react';
13-
import styles from 'dashboard/Dashboard.scss';
8+
import ParseApp from 'lib/ParseApp';
9+
import React from 'react';
10+
import Sidebar from 'components/Sidebar/Sidebar.react';
11+
import SidebarToggle from 'components/Sidebar/SidebarToggle.react';
12+
import styles from 'dashboard/Dashboard.scss';
1413

1514
export default class DashboardView extends React.Component {
1615

dashboard/Data/Migration/Migration.react.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
*/
88
import base from 'stylesheets/base.scss';
99
import Button from 'components/Button/Button.react';
10-
import check_gatekeeper from 'lib/check_gatekeeper';
1110
import DashboardView from 'dashboard/DashboardView.react';
1211
import FormNote from 'components/FormNote/FormNote.react';
1312
import Icon from 'components/Icon/Icon.react';
@@ -126,9 +125,6 @@ export default class Migration extends DashboardView {
126125
}
127126

128127
renderContent() {
129-
if (!check_gatekeeper('opendb_migration_page')) {
130-
return null;
131-
}
132128
return <div>
133129
<LiveReload
134130
ref={'reloaderView'}

dashboard/Settings/GeneralSettings.react.js

Lines changed: 55 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
*/
88
import AccountManager from 'lib/AccountManager';
99
import AppsManager from 'lib/AppsManager';
10-
import check_gatekeeper from 'lib/check_gatekeeper';
1110
import Collaborators from 'dashboard/Settings/Collaborators.react';
1211
import DashboardView from 'dashboard/DashboardView.react';
1312
import Dropdown from 'components/Dropdown/Dropdown.react';
@@ -209,63 +208,61 @@ let ManageAppFields = ({
209208
deleteApp,
210209
}) => {
211210
let migrateAppField = null;
212-
if (check_gatekeeper('opendb_migration_page')) {
213-
if (!mongoURL && !hasInProgressMigration) {
214-
migrateAppField = <Field
215-
labelWidth={DEFAULT_SETTINGS_LABEL_WIDTH}
216-
label={<Label
217-
text='Migrate to external database'
218-
description='Move your data and queries to your own database.' />
219-
}
220-
input={<FormButton
221-
color='red'
222-
onClick={startMigration}
223-
value='Migrate' />
224-
} />;
225-
} else if (hasInProgressMigration) {
226-
migrateAppField = <Field
227-
labelWidth={DEFAULT_SETTINGS_LABEL_WIDTH}
228-
label={<Label
229-
text='Migrate to external database'
230-
description='View your migration progress.' />}
231-
input={<FormButton
232-
color='blue'
233-
onClick={() => history.pushState(null, '/apps/' + appSlug + '/migration')}
234-
value='View progress' />} />
235-
} else {
236-
migrateAppField = [<Field
237-
key='show'
238-
labelWidth={DEFAULT_SETTINGS_LABEL_WIDTH}
239-
label={<Label
240-
text='Migration complete'
241-
description='Your database has been migrated to an external database.'
242-
/>}
243-
//TODO: KeyField bascially does what we want, but is maybe too specialized. Maybe at some point we should have a component dedicated to semi-secret stuff that we want to prevent shoulder surfers from seeing, and emphasizing that stuff something should be secret.
244-
input={<KeyField
245-
hidden={true}
246-
whenHiddenText='Show connection string'
247-
>
248-
<TextInput
249-
value={mongoURL}
250-
onChange={() => {}} //Make propTypes happy
251-
disabled={true}
252-
monospace={true}
253-
/>
254-
</KeyField>}
255-
/>,
256-
<Field
257-
key='new'
258-
labelWidth={DEFAULT_SETTINGS_LABEL_WIDTH}
259-
label={<Label
260-
text='Change connection string'
261-
description='Upgrate or change your database.'/>}
262-
input={<FormButton
263-
additionalStyles={{fontSize: '13px'}}
264-
color='red'
265-
onClick={changeConnectionString}
266-
value='Change connection string' />} />
267-
];
268-
}
211+
if (!mongoURL && !hasInProgressMigration) {
212+
migrateAppField = <Field
213+
labelWidth={DEFAULT_SETTINGS_LABEL_WIDTH}
214+
label={<Label
215+
text='Migrate to external database'
216+
description='Move your data and queries to your own database.' />
217+
}
218+
input={<FormButton
219+
color='red'
220+
onClick={startMigration}
221+
value='Migrate' />
222+
} />;
223+
} else if (hasInProgressMigration) {
224+
migrateAppField = <Field
225+
labelWidth={DEFAULT_SETTINGS_LABEL_WIDTH}
226+
label={<Label
227+
text='Migrate to external database'
228+
description='View your migration progress.' />}
229+
input={<FormButton
230+
color='blue'
231+
onClick={() => history.pushState(null, '/apps/' + appSlug + '/migration')}
232+
value='View progress' />} />
233+
} else {
234+
migrateAppField = [<Field
235+
key='show'
236+
labelWidth={DEFAULT_SETTINGS_LABEL_WIDTH}
237+
label={<Label
238+
text='Migration complete'
239+
description='Your database has been migrated to an external database.'
240+
/>}
241+
//TODO: KeyField bascially does what we want, but is maybe too specialized. Maybe at some point we should have a component dedicated to semi-secret stuff that we want to prevent shoulder surfers from seeing, and emphasizing that stuff something should be secret.
242+
input={<KeyField
243+
hidden={true}
244+
whenHiddenText='Show connection string'
245+
>
246+
<TextInput
247+
value={mongoURL}
248+
onChange={() => {}} //Make propTypes happy
249+
disabled={true}
250+
monospace={true}
251+
/>
252+
</KeyField>}
253+
/>,
254+
<Field
255+
key='new'
256+
labelWidth={DEFAULT_SETTINGS_LABEL_WIDTH}
257+
label={<Label
258+
text='Change connection string'
259+
description='Upgrate or change your database.'/>}
260+
input={<FormButton
261+
additionalStyles={{fontSize: '13px'}}
262+
color='red'
263+
onClick={changeConnectionString}
264+
value='Change connection string' />} />
265+
];
269266
}
270267
return (
271268
<Fieldset

dashboard/Settings/SecuritySettings.react.js

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,22 @@
55
* This source code is licensed under the license found in the LICENSE file in
66
* the root directory of this source tree.
77
*/
8-
import AccountManager from 'lib/AccountManager';
9-
import check_gatekeeper from 'lib/check_gatekeeper';
10-
import DashboardView from 'dashboard/DashboardView.react';
11-
import Field from 'components/Field/Field.react';
12-
import Fieldset from 'components/Fieldset/Fieldset.react';
13-
import FlowView from 'components/FlowView/FlowView.react';
14-
import FormButton from 'components/FormButton/FormButton.react';
15-
import FormModal from 'components/FormModal/FormModal.react';
16-
import FormNote from 'components/FormNote/FormNote.react';
17-
import KeyField from 'components/KeyField/KeyField.react';
18-
import Label from 'components/Label/Label.react';
19-
import Modal from 'components/Modal/Modal.react';
20-
import React from 'react';
21-
import styles from 'dashboard/Settings/Settings.scss';
22-
import TextInput from 'components/TextInput/TextInput.react';
23-
import Toggle from 'components/Toggle/Toggle.react';
24-
import Toolbar from 'components/Toolbar/Toolbar.react';
8+
import AccountManager from 'lib/AccountManager';
9+
import DashboardView from 'dashboard/DashboardView.react';
10+
import Field from 'components/Field/Field.react';
11+
import Fieldset from 'components/Fieldset/Fieldset.react';
12+
import FlowView from 'components/FlowView/FlowView.react';
13+
import FormButton from 'components/FormButton/FormButton.react';
14+
import FormModal from 'components/FormModal/FormModal.react';
15+
import FormNote from 'components/FormNote/FormNote.react';
16+
import KeyField from 'components/KeyField/KeyField.react';
17+
import Label from 'components/Label/Label.react';
18+
import Modal from 'components/Modal/Modal.react';
19+
import React from 'react';
20+
import styles from 'dashboard/Settings/Settings.scss';
21+
import TextInput from 'components/TextInput/TextInput.react';
22+
import Toggle from 'components/Toggle/Toggle.react';
23+
import Toolbar from 'components/Toolbar/Toolbar.react';
2524

2625
export default class SecuritySettings extends DashboardView {
2726
constructor() {
@@ -79,9 +78,6 @@ export default class SecuritySettings extends DashboardView {
7978
onChange={(allow) => setField('client_class_creation_enabled', allow)}/>
8079
} />
8180
</Fieldset> : null;
82-
let fileKeyField = check_gatekeeper('show_file_key') ? <Field
83-
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.' />}
84-
input={<KeyField name='File' hidden={true}>{currentApp.fileKey}</KeyField>} /> : null;
8581
return (
8682
<div className={styles.settings_page}>
8783
<Fieldset legend='App Keys' description='These are the unique identifiers used to access this app.'>
@@ -103,7 +99,9 @@ export default class SecuritySettings extends DashboardView {
10399
<Field
104100
label={<Label text='Webhook key' description='Use this when implementing a Cloud Code Webhook. Keep it secret!' />}
105101
input={<KeyField name='Webhook' hidden={true}>{currentApp.webhookKey}</KeyField>} />
106-
{fileKeyField}
102+
<Field
103+
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.' />}
104+
input={<KeyField name='File' hidden={true}>{currentApp.fileKey}</KeyField>} />
107105
<Field
108106
label={<Label text='Master key' description='Using this key overrides all permissions. Not usable on client SDKs. Keep it secret!' />}
109107
input={<KeyField name='Master' hidden={true}>{currentApp.masterKey}</KeyField>} />

dashboard/Settings/UsersSettings.react.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import renderFlowFooterChanges from 'lib/renderFlowFooterChanges';
1818
import style from 'dashboard/Settings/Settings.scss';
1919
import TextInput from 'components/TextInput/TextInput.react';
2020
import Toggle from 'components/Toggle/Toggle.react';
21-
import check_gatekeeper from 'lib/check_gatekeeper';
2221
import Toolbar from 'components/Toolbar/Toolbar.react';
2322
import unique from 'lib/unique';
2423
import { Promise } from 'parse';

dashboard/SidebarBuilder.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@
55
* This source code is licensed under the license found in the LICENSE file in
66
* the root directory of this source tree.
77
*/
8-
import check_gatekeeper from 'lib/check_gatekeeper';
9-
import React from 'react';
10-
import Sidebar from 'components/Sidebar/Sidebar.react';
11-
import SidebarSubItem from 'components/Sidebar/SidebarSubItem.react';
8+
import React from 'react';
9+
import Sidebar from 'components/Sidebar/Sidebar.react';
10+
import SidebarSubItem from 'components/Sidebar/SidebarSubItem.react';
1211

1312
let accountSidebarSections = [
1413
{

lib/check_gatekeeper.js

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)