From 07ca811ab3082f90e0c2faa8a7a3ac8c7944a091 Mon Sep 17 00:00:00 2001 From: Jared Scheib Date: Fri, 10 Nov 2017 01:09:57 -0800 Subject: [PATCH] Remove obsolete Default org Create User logic --- .../admin/containers/AdminChronografPage.js | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/ui/src/admin/containers/AdminChronografPage.js b/ui/src/admin/containers/AdminChronografPage.js index b77bf35bd5..03248747e7 100644 --- a/ui/src/admin/containers/AdminChronografPage.js +++ b/ui/src/admin/containers/AdminChronografPage.js @@ -5,15 +5,11 @@ import {bindActionCreators} from 'redux' import * as adminChronografActionCreators from 'src/admin/actions/chronograf' import {publishAutoDismissingNotification} from 'shared/dispatchers' -import {MEMBER_ROLE} from 'src/auth/Authorized' - import PageHeader from 'src/admin/components/chronograf/PageHeader' import UsersTable from 'src/admin/components/chronograf/UsersTable' import FancyScrollbar from 'shared/components/FancyScrollbar' -import {DEFAULT_ORG_ID} from 'src/admin/constants/dummyUsers' - class AdminChronografPage extends Component { // TODO: revisit this, possibly don't call setState if both are deep equal componentWillReceiveProps(nextProps) { @@ -40,21 +36,8 @@ class AdminChronografPage extends Component { // SINGLE USER ACTIONS handleCreateUser = user => { const {links, actions: {createUserAsync}} = this.props - let newUser = user - if ( - user.roles.length === 1 && - user.roles[0].organization !== DEFAULT_ORG_ID - ) { - newUser = { - ...newUser, - roles: [ - ...newUser.roles, - {organization: DEFAULT_ORG_ID, name: MEMBER_ROLE}, - ], - } - } - createUserAsync(links.users, newUser) + createUserAsync(links.users, user) } handleUpdateUserRole = () => (user, currentRole, {name}) => {