@@ -81,7 +81,8 @@ const cloudManagerHOC = function (WrappedComponent) {
8181 props . username &&
8282 props . vm &&
8383 props . projectId &&
84- props . hasCloudPermission
84+ props . hasCloudPermission &&
85+ ! props . cloudVariablesDisabledByUser
8586 ) ;
8687 }
8788 shouldConnect ( props ) {
@@ -147,6 +148,7 @@ const cloudManagerHOC = function (WrappedComponent) {
147148 canModifyCloudData,
148149 cloudHost,
149150 reduxCloudHost,
151+ cloudVariablesDisabledByUser,
150152 onSetReduxCloudHost,
151153 projectId,
152154 username,
@@ -172,6 +174,7 @@ const cloudManagerHOC = function (WrappedComponent) {
172174 canModifyCloudData : PropTypes . bool . isRequired ,
173175 cloudHost : PropTypes . string ,
174176 reduxCloudHost : PropTypes . string ,
177+ cloudVariablesDisabledByUser : PropTypes . bool . isRequired ,
175178 onSetReduxCloudHost : PropTypes . func ,
176179 hasCloudPermission : PropTypes . bool ,
177180 isShowingWithId : PropTypes . bool . isRequired ,
@@ -192,6 +195,7 @@ const cloudManagerHOC = function (WrappedComponent) {
192195 const loadingState = state . scratchGui . projectState . loadingState ;
193196 return {
194197 reduxCloudHost : state . scratchGui . tw . cloudHost ,
198+ cloudVariablesDisabledByUser : ! state . scratchGui . tw . cloud ,
195199 isShowingWithId : getIsShowingWithId ( loadingState ) ,
196200 projectId : state . scratchGui . projectState . projectId ,
197201 // if you're editing someone else's project, you can't modify cloud data
0 commit comments