File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
src/dashboard/Data/Browser Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -606,6 +606,9 @@ class Browser extends DashboardView {
606606
607607 createClass ( className , isProtected ) {
608608 let clp = isProtected ? protectedCLPs : defaultCLPS ;
609+ if ( semver . lte ( this . context . currentApp . serverInfo . parseServerVersion , '3.1.1' ) ) {
610+ clp = { } ;
611+ }
609612 this . props . schema . dispatch ( ActionTypes . CREATE_CLASS , { className, clp } ) . then ( ( ) => {
610613 this . state . counts [ className ] = 0 ;
611614 history . push ( this . context . generatePath ( 'browser/' + className ) ) ;
@@ -1672,11 +1675,13 @@ class Browser extends DashboardView {
16721675 ) ;
16731676 }
16741677 if ( this . state . showCreateClassDialog ) {
1678+ const { currentApp = { } } = this . context ;
16751679 extras = (
16761680 < CreateClassDialog
16771681 currentAppSlug = { this . context . currentApp . slug }
16781682 onAddColumn = { this . showAddColumn }
16791683 currentClasses = { this . props . schema . data . get ( 'classes' ) . keySeq ( ) . toArray ( ) }
1684+ parseServerVersion = { currentApp . serverInfo && currentApp . serverInfo . parseServerVersion }
16801685 onCancel = { ( ) => this . setState ( { showCreateClassDialog : false } ) }
16811686 onConfirm = { this . createClass } />
16821687 ) ;
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import Label from 'components/Label/Label.react';
1111import Modal from 'components/Modal/Modal.react' ;
1212import Option from 'components/Dropdown/Option.react' ;
1313import React from 'react' ;
14+ import semver from 'semver/preload.js' ;
1415import { SpecialClasses } from 'lib/Constants' ;
1516import styles from './Browser.scss' ;
1617import TextInput from 'components/TextInput/TextInput.react' ;
@@ -108,7 +109,7 @@ export default class CreateClassDialog extends React.Component {
108109 }
109110 input = { typeDropdown } /> : null
110111 }
111- { this . state . type === 'Custom' ?
112+ { this . state . type === 'Custom' && semver . gt ( this . props . parseServerVersion , '3.1.1' ) ?
112113 ( < >
113114 < Field
114115 label = { < Label text = 'Add in Protected mode' description = { 'Your class\'s objects are protected by default. Client read/write access will only be granted when specified by your CLPs/ACLs security rules.' } /> }
You can’t perform that action at this time.
0 commit comments