Skip to content

Commit a9f2d88

Browse files
committed
Clear user & pass from LoginDialog on handleClose
1 parent dee9e96 commit a9f2d88

File tree

2 files changed

+1
-36
lines changed

2 files changed

+1
-36
lines changed

src/dashboard/Data/Browser/BrowserToolbar.react.js

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -247,41 +247,6 @@ let BrowserToolbar = ({
247247
blacklistedFilters={onAddRow ? [] : ['unique']}
248248
/>
249249
{onAddRow && <div className={styles.toolbarSeparator} />}
250-
{onAddRow && (
251-
<LoginDialog
252-
ref={loginDialogRef}
253-
currentUser={currentUser}
254-
login={login}
255-
logout={logout}
256-
/>
257-
)}
258-
{onAddRow && (
259-
<BrowserMenu
260-
setCurrent={setCurrent}
261-
title={currentUser ? 'Browsing' : 'Browse'}
262-
icon="users-solid"
263-
active={!!currentUser}
264-
>
265-
<MenuItem text={currentUser ? 'Switch User' : 'As User'} onClick={showLogin} />
266-
{currentUser ? <MenuItem text={<span>Use Master Key <Toggle type={Toggle.Types.HIDE_LABELS} value={useMasterKey} onChange={toggleMasterKeyUsage} switchNoMargin={true} additionalStyles={{ display: 'inline', lineHeight: 0, margin: 0, paddingLeft: 5 }} /></span>} onClick={toggleMasterKeyUsage} /> : <noscript />}
267-
{currentUser ? <MenuItem text={<span>Stop browsing (<b>{currentUser.get('username')}</b>)</span>} onClick={logout} /> : <noscript />}
268-
</BrowserMenu>
269-
)}
270-
{onAddRow && <div className={styles.toolbarSeparator} />}
271-
<a className={styles.toolbarButton} onClick={onRefresh}>
272-
<Icon name="refresh-solid" width={14} height={14} />
273-
<span>Refresh</span>
274-
</a>
275-
<div className={styles.toolbarSeparator} />
276-
<BrowserFilter
277-
setCurrent={setCurrent}
278-
schema={schemaSimplifiedData}
279-
filters={filters}
280-
onChange={onFilterChange}
281-
className={classNameForEditors}
282-
blacklistedFilters={onAddRow ? [] : ['unique']}
283-
/>
284-
{onAddRow && <div className={styles.toolbarSeparator} />}
285250
{perms && enableSecurityDialog ? (
286251
<SecurityDialog
287252
ref={clpDialogRef}

src/dashboard/Data/Browser/LoginDialog.react.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default class LoginDialog extends React.Component {
2525
}
2626

2727
handleClose() {
28-
this.setState({ open: false });
28+
this.setState({ username: '', password: '', open: false });
2929
}
3030

3131
async login() {

0 commit comments

Comments
 (0)