From dd08081da5e8736c1808d8b9c40f5ddfdf9d8e41 Mon Sep 17 00:00:00 2001 From: Vikas Agarwal Date: Wed, 14 Dec 2016 12:18:57 +0530 Subject: [PATCH 1/2] Github issue #572, Messaging: Owner response post missing from status update -- Removed the constraint of user to be a team member of the project in order to view the comments of status updates. Further, I am assuming we need to do the same for Discussions tab as well, so removing the constraint there as well. So, now any user who has the access to the project's dashboard and discussions pages, can view posts and comments. --- src/projects/detail/containers/FeedContainer.js | 2 +- src/projects/detail/containers/MessagesContainer.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/projects/detail/containers/FeedContainer.js b/src/projects/detail/containers/FeedContainer.js index 4a36eb3bb..40ddc4ad4 100644 --- a/src/projects/detail/containers/FeedContainer.js +++ b/src/projects/detail/containers/FeedContainer.js @@ -212,7 +212,7 @@ class FeedView extends React.Component {
Date: Wed, 14 Dec 2016 12:42:36 +0530 Subject: [PATCH 2/2] Github issue #572, Messaging: Owner response post missing from status update -- Reverted previous changes. Found the root cause of the problem. Actually the flag, to prevent non team member from commenting on posts, was wrongly being used to render the feed's comments section on dashboard. It is used correctly on Discussions page. --- src/components/Feed/Feed.jsx | 4 ++-- src/components/Feed/FeedComments.jsx | 5 +++-- src/projects/detail/containers/FeedContainer.js | 2 +- src/projects/detail/containers/MessagesContainer.js | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/components/Feed/Feed.jsx b/src/components/Feed/Feed.jsx index 963cbcdfc..168ee7bb5 100644 --- a/src/components/Feed/Feed.jsx +++ b/src/components/Feed/Feed.jsx @@ -36,8 +36,8 @@ const Feed = (props) => {
- {allowComments && { avatarUrl={currentUser.photoURL} comments={comments} isAddingComment={ isAddingComment } - />} + /> {children} ) diff --git a/src/components/Feed/FeedComments.jsx b/src/components/Feed/FeedComments.jsx index d8e93b8fd..ec8da7997 100644 --- a/src/components/Feed/FeedComments.jsx +++ b/src/components/Feed/FeedComments.jsx @@ -25,7 +25,7 @@ class FeedComments extends React.Component { render() { const { comments, currentUser, totalComments, onLoadMoreComments, isLoadingComments, hasMoreComments, onAdd, - onChange, content, avatarUrl, isAddingComment + onChange, content, avatarUrl, isAddingComment, allowComments } = this.props let authorName = currentUser.firstName if (authorName && currentUser.lastName) { @@ -77,6 +77,7 @@ class FeedComments extends React.Component {
)} + {allowComments && + />}
) } diff --git a/src/projects/detail/containers/FeedContainer.js b/src/projects/detail/containers/FeedContainer.js index 40ddc4ad4..4a36eb3bb 100644 --- a/src/projects/detail/containers/FeedContainer.js +++ b/src/projects/detail/containers/FeedContainer.js @@ -212,7 +212,7 @@ class FeedView extends React.Component {