From 0fe75cb7826944a3352705d5e78eba1d12cc213a Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Tue, 17 May 2016 12:27:03 -0400 Subject: PLT-1909 Removed the ability to edit system posts (#3013) * Removed the ability to edit system posts * Added increased timeout to SpinnerButton unit tests --- webapp/components/post_info.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'webapp/components/post_info.jsx') 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(