Github user robertkowalski commented on a diff in the pull request:

    https://github.com/apache/couchdb-fauxton/pull/761#discussion_r87580975
  
    --- Diff: app/addons/auth/components.react.jsx ---
    @@ -302,9 +305,87 @@ var CreateAdminSidebar = React.createClass({
       }
     });
     
    +
    +class PasswordModal extends React.Component {
    +  constructor (props) {
    +    super(props);
    +    this.state = {
    +      password: ''
    +    };
    +    this.authenticate = this.authenticate.bind(this);
    +    this.onKeyPress = this.onKeyPress.bind(this);
    +  }
    +
    +  // clicking <Enter> should submit the form
    +  onKeyPress (e) {
    +    if (e.key === 'Enter') {
    +      this.authenticate();
    +    }
    +  }
    +
    +  // default authentication function. This can be overridden via props if 
you want to do something different
    +  authenticate () {
    +    const username = app.session.get('userCtx').name; // yuck. But 
simplest for now until logging in publishes the user data
    --- End diff --
    
    agreed


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to