Remove superAdmin toggle & data when creating a new user
Signed-off-by: Alex Paxton <thealexpaxton@gmail.com>pull/10616/head
parent
e8861e9b74
commit
82871771e9
|
@ -3,7 +3,6 @@ import React, {Component, PropTypes} from 'react'
|
|||
import Authorized, {SUPERADMIN_ROLE} from 'src/auth/Authorized'
|
||||
|
||||
import Dropdown from 'shared/components/Dropdown'
|
||||
import SlideToggle from 'shared/components/SlideToggle'
|
||||
|
||||
import {USERS_TABLE} from 'src/admin/constants/chronografTableSizing'
|
||||
import {USER_ROLES} from 'src/admin/constants/chronografAdmin'
|
||||
|
@ -17,7 +16,6 @@ class UsersTableRowNew extends Component {
|
|||
provider: '',
|
||||
scheme: 'oauth2',
|
||||
role: this.props.organization.defaultRole,
|
||||
superAdmin: false,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -54,10 +52,6 @@ class UsersTableRowNew extends Component {
|
|||
this.setState({role: newRole.text})
|
||||
}
|
||||
|
||||
handleSelectSuperAdmin = superAdmin => {
|
||||
this.setState({superAdmin})
|
||||
}
|
||||
|
||||
handleKeyDown = e => {
|
||||
const {name, provider} = this.state
|
||||
const preventCreate = !name || !provider
|
||||
|
@ -86,7 +80,7 @@ class UsersTableRowNew extends Component {
|
|||
colActions,
|
||||
} = USERS_TABLE
|
||||
const {onBlur} = this.props
|
||||
const {name, provider, scheme, role, superAdmin} = this.state
|
||||
const {name, provider, scheme, role} = this.state
|
||||
|
||||
const dropdownRolesItems = USER_ROLES.map(r => ({...r, text: r.name}))
|
||||
const preventCreate = !name || !provider
|
||||
|
@ -116,11 +110,7 @@ class UsersTableRowNew extends Component {
|
|||
</td>
|
||||
<Authorized requiredRole={SUPERADMIN_ROLE}>
|
||||
<td style={{width: colSuperAdmin}} className="text-center">
|
||||
<SlideToggle
|
||||
active={superAdmin}
|
||||
size="xs"
|
||||
onToggle={this.handleSelectSuperAdmin}
|
||||
/>
|
||||
—
|
||||
</td>
|
||||
</Authorized>
|
||||
<td style={{width: colProvider}}>
|
||||
|
|
|
@ -104,11 +104,6 @@ table.table.chronograf-admin-table tbody tr.chronograf-admin-table--user td div.
|
|||
/* Styles for new user row */
|
||||
table.table.chronograf-admin-table tbody tr.chronograf-admin-table--new-user {
|
||||
background-color: $g4-onyx;
|
||||
|
||||
> td {
|
||||
padding-top: 8px;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Highlight "Me" in the users table */
|
||||
|
|
Loading…
Reference in New Issue