diff --git a/src/components/views/rooms/RoomSettings.js b/src/components/views/rooms/RoomSettings.js index 4311f1b23d..b6f820efd8 100644 --- a/src/components/views/rooms/RoomSettings.js +++ b/src/components/views/rooms/RoomSettings.js @@ -272,7 +272,9 @@ module.exports = React.createClass({ var power_levels = this.props.room.currentState.getStateEvents('m.room.power_levels', ''); var events_levels = (power_levels ? power_levels.events : {}) || {}; - var user_id = MatrixClientPeg.get().credentials.userId; + var cli = MatrixClientPeg.get(); + var roomState = this.props.room.currentState; + var user_id = cli.credentials.userId; if (power_levels) { power_levels = power_levels.getContent(); @@ -321,18 +323,7 @@ module.exports = React.createClass({ var state_default = (parseInt(power_levels ? power_levels.state_default : 0) || 0); - var room_aliases_level = state_default; - if (events_levels['m.room.aliases'] !== undefined) { - room_aliases_level = events_levels['m.room.aliases']; - } - var can_set_room_aliases = current_user_level >= room_aliases_level; - - var canonical_alias_level = state_default; - if (events_levels['m.room.canonical_alias'] !== undefined) { - canonical_alias_level = events_levels['m.room.canonical_alias']; - } - var canSetCanonicalAlias = current_user_level >= canonical_alias_level; - var canSetTag = true; + var canSetTag = !cli.isGuest(); var self = this; @@ -409,7 +400,7 @@ module.exports = React.createClass({ onChange={ self._onTagChange.bind(self, tag.name) }/> { tag.label } ); - }) : tags.map(function(tag) { return tag.label; }).join(", ") + }) : (self.state.tags && self.state.tags.join) ? self.state.tags.join(", ") : "None" } @@ -425,16 +416,20 @@ module.exports = React.createClass({
@@ -442,24 +437,28 @@ module.exports = React.createClass({

Who can read history?