diff options
author | 2018-02-27 13:32:59 +0100 | |
---|---|---|
committer | 2018-02-27 13:32:59 +0100 | |
commit | 29a69b86a2d2a76a66813c4099952f9d46ec7a9f (patch) | |
tree | 6a6b696d7ea2e63c77cbd01100aaf1ec1c507c13 /src/components | |
parent | Merge branch 'feature/features-api' into feature/enterprise-ui (diff) | |
download | ferdium-app-29a69b86a2d2a76a66813c4099952f9d46ec7a9f.tar.gz ferdium-app-29a69b86a2d2a76a66813c4099952f9d46ec7a9f.tar.zst ferdium-app-29a69b86a2d2a76a66813c4099952f9d46ec7a9f.zip |
adapt enterprise UI flags to features-api
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/settings/navigation/SettingsNavigation.js | 8 | ||||
-rw-r--r-- | src/components/settings/services/EditServiceForm.js | 4 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/components/settings/navigation/SettingsNavigation.js b/src/components/settings/navigation/SettingsNavigation.js index 620f09189..46b2f82fc 100644 --- a/src/components/settings/navigation/SettingsNavigation.js +++ b/src/components/settings/navigation/SettingsNavigation.js | |||
@@ -44,12 +44,12 @@ export default class SettingsNavigation extends Component { | |||
44 | 44 | ||
45 | render() { | 45 | render() { |
46 | const { serviceCount } = this.props; | 46 | const { serviceCount } = this.props; |
47 | const { data: user } = this.props.stores.user; | 47 | const { features } = this.props.stores.features; |
48 | const { intl } = this.context; | 48 | const { intl } = this.context; |
49 | 49 | ||
50 | return ( | 50 | return ( |
51 | <div className="settings-navigation"> | 51 | <div className="settings-navigation"> |
52 | {user.clientSettings && user.clientSettings.userCanManageServices && ( | 52 | {features.userCanManageServices && ( |
53 | <Link | 53 | <Link |
54 | to="/settings/recipes" | 54 | to="/settings/recipes" |
55 | className="settings-navigation__link" | 55 | className="settings-navigation__link" |
@@ -100,8 +100,8 @@ export default class SettingsNavigation extends Component { | |||
100 | 100 | ||
101 | SettingsNavigation.wrappedComponent.propTypes = { | 101 | SettingsNavigation.wrappedComponent.propTypes = { |
102 | stores: PropTypes.shape({ | 102 | stores: PropTypes.shape({ |
103 | user: PropTypes.shape({ | 103 | features: PropTypes.shape({ |
104 | data: PropTypes.object.isRequired, | 104 | features: PropTypes.object.isRequired, |
105 | }).isRequired, | 105 | }).isRequired, |
106 | }).isRequired, | 106 | }).isRequired, |
107 | }; | 107 | }; |
diff --git a/src/components/settings/services/EditServiceForm.js b/src/components/settings/services/EditServiceForm.js index e23dfa9f6..3ffca99a7 100644 --- a/src/components/settings/services/EditServiceForm.js +++ b/src/components/settings/services/EditServiceForm.js | |||
@@ -107,6 +107,7 @@ export default class EditServiceForm extends Component { | |||
107 | return null; | 107 | return null; |
108 | }, | 108 | }, |
109 | user: PropTypes.instanceOf(User).isRequired, | 109 | user: PropTypes.instanceOf(User).isRequired, |
110 | userCanManageServices: PropTypes.bool.isRequired, | ||
110 | action: PropTypes.string.isRequired, | 111 | action: PropTypes.string.isRequired, |
111 | form: PropTypes.instanceOf(Form).isRequired, | 112 | form: PropTypes.instanceOf(Form).isRequired, |
112 | onSubmit: PropTypes.func.isRequired, | 113 | onSubmit: PropTypes.func.isRequired, |
@@ -169,6 +170,7 @@ export default class EditServiceForm extends Component { | |||
169 | service, | 170 | service, |
170 | action, | 171 | action, |
171 | user, | 172 | user, |
173 | userCanManageServices, | ||
172 | form, | 174 | form, |
173 | isSaving, | 175 | isSaving, |
174 | isDeleting, | 176 | isDeleting, |
@@ -324,7 +326,7 @@ export default class EditServiceForm extends Component { | |||
324 | </div> | 326 | </div> |
325 | <div className="settings__controls"> | 327 | <div className="settings__controls"> |
326 | {/* Delete Button */} | 328 | {/* Delete Button */} |
327 | {action === 'edit' && user.clientSettings.userCanManageServices && deleteButton} | 329 | {action === 'edit' && userCanManageServices && deleteButton} |
328 | 330 | ||
329 | {/* Save Button */} | 331 | {/* Save Button */} |
330 | {isSaving || isValidatingCustomUrl ? ( | 332 | {isSaving || isValidatingCustomUrl ? ( |