diff options
author | Harrison Healey <harrisonmhealey@gmail.com> | 2016-05-17 12:27:03 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-05-17 12:27:03 -0400 |
commit | 0fe75cb7826944a3352705d5e78eba1d12cc213a (patch) | |
tree | e7391d4540f42c9dea23631217b8823db43d632e /webapp/components/post_info.jsx | |
parent | 5580c28e54015b78893c33cc3bf41da75712c4cb (diff) | |
download | chat-0fe75cb7826944a3352705d5e78eba1d12cc213a.tar.gz chat-0fe75cb7826944a3352705d5e78eba1d12cc213a.tar.bz2 chat-0fe75cb7826944a3352705d5e78eba1d12cc213a.zip |
PLT-1909 Removed the ability to edit system posts (#3013)
* Removed the ability to edit system posts
* Added increased timeout to SpinnerButton unit tests
Diffstat (limited to 'webapp/components/post_info.jsx')
-rw-r--r-- | webapp/components/post_info.jsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/webapp/components/post_info.jsx b/webapp/components/post_info.jsx index f86c63fd7..ed316745f 100644 --- a/webapp/components/post_info.jsx +++ b/webapp/components/post_info.jsx @@ -33,6 +33,7 @@ export default class PostInfo extends React.Component { var post = this.props.post; var isOwner = this.props.currentUser.id === post.user_id; var isAdmin = TeamStore.isTeamAdminForCurrentTeam() || UserStore.isSystemAdminForCurrentUser(); + const isSystemMessage = post.type.startsWith(Constants.SYSTEM_MESSAGE_PREFIX); if (post.state === Constants.POST_FAILED || post.state === Constants.POST_LOADING || Utils.isPostEphemeral(post)) { return ''; @@ -108,7 +109,7 @@ export default class PostInfo extends React.Component { ); } - if (isOwner) { + if (isOwner && !isSystemMessage) { dropdownContents.push( <li key='editPost' |