| |
@@ -1,6 +1,5 @@
|
| |
import React from 'react';
|
| |
import {
|
| |
- injectIntl,
|
| |
defineMessages,
|
| |
FormattedMessage,
|
| |
FormattedHTMLMessage,
|
| |
@@ -76,7 +75,7 @@
|
| |
|
| |
handleAdd(e) {
|
| |
e.preventDefault();
|
| |
- this.props.handleChange(this.state.addUser, null, this.props.role);
|
| |
+ this.props.handleChange(this.state.addUser, null, this.props.hubRole);
|
| |
this.setState({addUser: null, addUserInputContents: ""});
|
| |
}
|
| |
|
| |
@@ -91,16 +90,16 @@
|
| |
filterSuggestedUsers(user) {
|
| |
// Only suggest non-members.
|
| |
return (
|
| |
- this.props.users[this.props.role].indexOf(user) === -1
|
| |
+ this.props.users[this.props.hubRole].indexOf(user) === -1
|
| |
&&
|
| |
- this.props.users[`pending-${this.props.role}`].indexOf(user) === -1
|
| |
+ this.props.users[`pending-${this.props.hubRole}`].indexOf(user) === -1
|
| |
);
|
| |
}
|
| |
|
| |
render() {
|
| |
- const users = this.props.users[this.props.role].map(user => {
|
| |
+ const users = this.props.users[this.props.hubRole].map(user => {
|
| |
const locked = (
|
| |
- this.props.role === "owner" &&
|
| |
+ this.props.hubRole === "owner" &&
|
| |
this.props.currentUser.logged_in &&
|
| |
user.username === this.props.currentUser.nickname
|
| |
);
|
| |
@@ -108,18 +107,18 @@
|
| |
<UserRow
|
| |
key={user.username}
|
| |
user={user}
|
| |
- role={this.props.role}
|
| |
+ hubRole={this.props.hubRole}
|
| |
globalConfig={this.props.globalConfig}
|
| |
onChange={this.props.handleChange}
|
| |
locked={locked}
|
| |
/>
|
| |
);
|
| |
});
|
| |
- const pendingUsers = this.props.users[`pending-${this.props.role}`].map(user => (
|
| |
+ const pendingUsers = this.props.users[`pending-${this.props.hubRole}`].map(user => (
|
| |
<UserRow
|
| |
key={user.username}
|
| |
user={user}
|
| |
- role={`pending-${this.props.role}`}
|
| |
+ hubRole={`pending-${this.props.hubRole}`}
|
| |
globalConfig={this.props.globalConfig}
|
| |
onChange={this.props.handleChange}
|
| |
/>
|
| |
@@ -188,7 +187,7 @@
|
| |
}}
|
| |
url={(
|
| |
this.props.urls.hubConfigSuggestUsers
|
| |
- + "?exclude-role=" + this.props.role
|
| |
+ + "?exclude-role=" + this.props.hubRole
|
| |
)}
|
| |
getSuggestionValue={getSuggestionValue}
|
| |
renderSuggestion={renderSuggestion}
|
| |
@@ -240,7 +239,7 @@
|
| |
|
| |
handleChange(e) {
|
| |
e.preventDefault();
|
| |
- this.props.onChange(this.props.user, this.props.role, e.target.value);
|
| |
+ this.props.onChange(this.props.user, this.props.hubRole, e.target.value);
|
| |
}
|
| |
|
| |
render() {
|
| |
@@ -255,7 +254,7 @@
|
| |
:
|
| |
<select
|
| |
name={this.props.user.username}
|
| |
- value={this.props.role}
|
| |
+ value={this.props.hubRole}
|
| |
className="form-control"
|
| |
onChange={this.handleChange}
|
| |
>
|
| |
Our Javascript linter was not configured properly before, so I've set it up as in
create-react-app
's configuration. It detected a lot of stuff, so I fixed them. There were even actual bugs in there, not just unused imports :-)