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 {
606
606
607
607
createClass ( className , isProtected ) {
608
608
let clp = isProtected ? protectedCLPs : defaultCLPS ;
609
+ if ( semver . lte ( this . context . currentApp . serverInfo . parseServerVersion , '3.1.1' ) ) {
610
+ clp = { } ;
611
+ }
609
612
this . props . schema . dispatch ( ActionTypes . CREATE_CLASS , { className, clp } ) . then ( ( ) => {
610
613
this . state . counts [ className ] = 0 ;
611
614
history . push ( this . context . generatePath ( 'browser/' + className ) ) ;
@@ -1672,11 +1675,13 @@ class Browser extends DashboardView {
1672
1675
) ;
1673
1676
}
1674
1677
if ( this . state . showCreateClassDialog ) {
1678
+ const { currentApp = { } } = this . context ;
1675
1679
extras = (
1676
1680
< CreateClassDialog
1677
1681
currentAppSlug = { this . context . currentApp . slug }
1678
1682
onAddColumn = { this . showAddColumn }
1679
1683
currentClasses = { this . props . schema . data . get ( 'classes' ) . keySeq ( ) . toArray ( ) }
1684
+ parseServerVersion = { currentApp . serverInfo && currentApp . serverInfo . parseServerVersion }
1680
1685
onCancel = { ( ) => this . setState ( { showCreateClassDialog : false } ) }
1681
1686
onConfirm = { this . createClass } />
1682
1687
) ;
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import Label from 'components/Label/Label.react';
11
11
import Modal from 'components/Modal/Modal.react' ;
12
12
import Option from 'components/Dropdown/Option.react' ;
13
13
import React from 'react' ;
14
+ import semver from 'semver/preload.js' ;
14
15
import { SpecialClasses } from 'lib/Constants' ;
15
16
import styles from './Browser.scss' ;
16
17
import TextInput from 'components/TextInput/TextInput.react' ;
@@ -108,7 +109,7 @@ export default class CreateClassDialog extends React.Component {
108
109
}
109
110
input = { typeDropdown } /> : null
110
111
}
111
- { this . state . type === 'Custom' ?
112
+ { this . state . type === 'Custom' && semver . gt ( this . props . parseServerVersion , '3.1.1' ) ?
112
113
( < >
113
114
< Field
114
115
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