Merge pull request #950 from mattermost/PLT-519
PLT-519 toggle team creation link based on config setting
Этот коммит содержится в:
@@ -89,4 +89,4 @@
|
|||||||
"TokenEndpoint": "",
|
"TokenEndpoint": "",
|
||||||
"UserApiEndpoint": ""
|
"UserApiEndpoint": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -179,6 +179,8 @@ func getClientProperties(c *model.Config) map[string]string {
|
|||||||
props["BuildHash"] = model.BuildHash
|
props["BuildHash"] = model.BuildHash
|
||||||
|
|
||||||
props["SiteName"] = c.TeamSettings.SiteName
|
props["SiteName"] = c.TeamSettings.SiteName
|
||||||
|
props["EnableTeamCreation"] = strconv.FormatBool(c.TeamSettings.EnableTeamCreation)
|
||||||
|
|
||||||
props["EnableOAuthServiceProvider"] = strconv.FormatBool(c.ServiceSettings.EnableOAuthServiceProvider)
|
props["EnableOAuthServiceProvider"] = strconv.FormatBool(c.ServiceSettings.EnableOAuthServiceProvider)
|
||||||
|
|
||||||
props["SegmentDeveloperKey"] = c.ServiceSettings.SegmentDeveloperKey
|
props["SegmentDeveloperKey"] = c.ServiceSettings.SegmentDeveloperKey
|
||||||
|
|||||||
@@ -135,30 +135,35 @@ export default class NavbarDropdown extends React.Component {
|
|||||||
|
|
||||||
var teams = [];
|
var teams = [];
|
||||||
|
|
||||||
teams.push(
|
|
||||||
<li
|
|
||||||
className='divider'
|
|
||||||
key='div'
|
|
||||||
>
|
|
||||||
</li>
|
|
||||||
);
|
|
||||||
|
|
||||||
if (this.state.teams.length > 1) {
|
if (this.state.teams.length > 1) {
|
||||||
|
teams.push(
|
||||||
|
<li
|
||||||
|
className='divider'
|
||||||
|
key='div'
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
);
|
||||||
|
|
||||||
this.state.teams.forEach((teamName) => {
|
this.state.teams.forEach((teamName) => {
|
||||||
if (teamName !== this.props.teamName) {
|
if (teamName !== this.props.teamName) {
|
||||||
teams.push(<li key={teamName}><a href={Utils.getWindowLocationOrigin() + '/' + teamName}>{'Switch to ' + teamName}</a></li>);
|
teams.push(<li key={teamName}><a href={Utils.getWindowLocationOrigin() + '/' + teamName}>{'Switch to ' + teamName}</a></li>);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
teams.push(<li key='newTeam_li'>
|
|
||||||
<a
|
if (global.window.config.EnableTeamCreation === 'true') {
|
||||||
key='newTeam_a'
|
teams.push(
|
||||||
target='_blank'
|
<li key='newTeam_li'>
|
||||||
href={Utils.getWindowLocationOrigin() + '/signup_team'}
|
<a
|
||||||
>
|
key='newTeam_a'
|
||||||
{'Create a New Team'}
|
target='_blank'
|
||||||
</a>
|
href={Utils.getWindowLocationOrigin() + '/signup_team'}
|
||||||
</li>);
|
>
|
||||||
|
{'Create a New Team'}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ul className='nav navbar-nav navbar-right'>
|
<ul className='nav navbar-nav navbar-right'>
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user