settings: remove Restart as a user button in an elevated context (#1328)

This commit is contained in:
Andrey Nekrasov 2020-02-19 18:51:24 +03:00 committed by GitHub
parent 27f0782465
commit e21f83267a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 8 deletions

View File

@ -140,16 +140,12 @@ export class GeneralSettings extends React.Component <any, any> {
ref={(input) => {this.elevated_reference=input;}}
/>)
}
{this.state.settings.general.is_admin &&
{this.state.settings.general.is_admin && !this.state.settings.general.is_elevated &&
(<CustomActionSettingsControl
setting={{
display_name: '',
value: this.state.settings.general.is_elevated ?
'Running as administrator. Do you wish to run as user instead?' :
'Running as user. Do you wish to run as administrator instead?',
button_text: this.state.settings.general.is_elevated ?
'Restart as user' :
'Restart as administrator'
value: 'Running as user. Do you wish to run as administrator instead?',
button_text: 'Restart as administrator'
}}
action_name={'restart_elevation'}
action_callback={(action_name: any, value:any) => {

File diff suppressed because one or more lines are too long