Honour the is_privileged flag in GroupView
This commit is contained in:
parent
3f0ee4e6ad
commit
3c2e6fdf9e
2 changed files with 16 additions and 9 deletions
|
@ -545,8 +545,12 @@ export default React.createClass({
|
||||||
</div>
|
</div>
|
||||||
</div>;
|
</div>;
|
||||||
} else if (group.myMembership === 'join') {
|
} else if (group.myMembership === 'join') {
|
||||||
|
let youAreAMemberText = _t("You are a member of this group");
|
||||||
|
if (this.state.summary.user && this.state.summary.user.is_privileged) {
|
||||||
|
youAreAMemberText = _t("You are an administrator of this group");
|
||||||
|
}
|
||||||
return <div className="mx_GroupView_invitedSection">
|
return <div className="mx_GroupView_invitedSection">
|
||||||
{_t("You are a member of this group")}
|
{youAreAMemberText}
|
||||||
<div className="mx_GroupView_membership_buttonContainer">
|
<div className="mx_GroupView_membership_buttonContainer">
|
||||||
<AccessibleButton className="mx_GroupView_textButton mx_RoomHeader_textButton"
|
<AccessibleButton className="mx_GroupView_textButton mx_RoomHeader_textButton"
|
||||||
onClick={this._onLeaveClick}
|
onClick={this._onLeaveClick}
|
||||||
|
@ -667,13 +671,15 @@ export default React.createClass({
|
||||||
{this._getFeaturedRoomsNode()}
|
{this._getFeaturedRoomsNode()}
|
||||||
{this._getFeaturedUsersNode()}
|
{this._getFeaturedUsersNode()}
|
||||||
</div>;
|
</div>;
|
||||||
rightButtons.push(
|
if (summary.user && summary.user.is_privileged) {
|
||||||
<AccessibleButton className="mx_GroupHeader_button"
|
rightButtons.push(
|
||||||
onClick={this._onEditClick} title={_t("Edit Group")} key="_editButton"
|
<AccessibleButton className="mx_GroupHeader_button"
|
||||||
>
|
onClick={this._onEditClick} title={_t("Edit Group")} key="_editButton"
|
||||||
<TintableSvg src="img/icons-settings-room.svg" width="16" height="16"/>
|
>
|
||||||
</AccessibleButton>,
|
<TintableSvg src="img/icons-settings-room.svg" width="16" height="16"/>
|
||||||
);
|
</AccessibleButton>,
|
||||||
|
);
|
||||||
|
}
|
||||||
if (this.props.collapsedRhs) {
|
if (this.props.collapsedRhs) {
|
||||||
rightButtons.push(
|
rightButtons.push(
|
||||||
<AccessibleButton className="mx_GroupHeader_button"
|
<AccessibleButton className="mx_GroupHeader_button"
|
||||||
|
|
|
@ -892,5 +892,6 @@
|
||||||
"Add users to the group summary": "Add users to the group summary",
|
"Add users to the group summary": "Add users to the group summary",
|
||||||
"Who would you like to add to this summary?": "Who would you like to add to this summary?",
|
"Who would you like to add to this summary?": "Who would you like to add to this summary?",
|
||||||
"Add to summary": "Add to summary",
|
"Add to summary": "Add to summary",
|
||||||
"Failed to add the following users to the summary of %(groupId)s:": "Failed to add the following users to the summary of %(groupId)s:"
|
"Failed to add the following users to the summary of %(groupId)s:": "Failed to add the following users to the summary of %(groupId)s:",
|
||||||
|
"You are an administrator of this group": "You are an administrator of this group"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue