Disable removal of items if the user doesn't have permission

This commit is contained in:
Travis Ralston 2019-02-21 17:15:25 -07:00
parent 003d0eb0bf
commit 1e6594ceba
3 changed files with 25 additions and 16 deletions

View file

@ -240,6 +240,7 @@ export default class AliasSettings extends React.Component {
items={this.state.domainToAliases[localDomain] || []}
newItem={this.state.newAlias}
onNewItemChanged={this.onNewAliasChanged}
canRemove={this.props.canSetAliases}
canEdit={this.props.canSetAliases}
onItemAdded={this.onLocalAliasAdded}
onItemRemoved={this.onLocalAliasDeleted}

View file

@ -107,6 +107,7 @@ export default class RelatedGroupSettings extends React.Component {
items={this.state.newGroupsList}
className={"mx_RelatedGroupSettings"}
newItem={this.state.newGroupId}
canRemove={this.props.canSetRelatedGroups}
canEdit={this.props.canSetRelatedGroups}
onNewItemChanged={this.onNewGroupChanged}
onItemAdded={this.onGroupAdded}