summaryrefslogtreecommitdiffstats
path: root/webapp/components/rhs_root_post.jsx
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2016-03-21 10:30:17 -0400
committerHarrison Healey <harrisonmhealey@gmail.com>2016-03-21 10:30:17 -0400
commitbb16a71d6eb77c8035c7b1672aa1d5bc8ed7045e (patch)
treee28e9780a213a039cac5fe24c09a296ba7a7f4ad /webapp/components/rhs_root_post.jsx
parent85837efe06a93b38e449c750108a4105cc629611 (diff)
downloadchat-bb16a71d6eb77c8035c7b1672aa1d5bc8ed7045e.tar.gz
chat-bb16a71d6eb77c8035c7b1672aa1d5bc8ed7045e.tar.bz2
chat-bb16a71d6eb77c8035c7b1672aa1d5bc8ed7045e.zip
Passed currentUser into RhsRootPost
Diffstat (limited to 'webapp/components/rhs_root_post.jsx')
-rw-r--r--webapp/components/rhs_root_post.jsx5
1 files changed, 3 insertions, 2 deletions
diff --git a/webapp/components/rhs_root_post.jsx b/webapp/components/rhs_root_post.jsx
index a2c7ee7f8..1aa4a555f 100644
--- a/webapp/components/rhs_root_post.jsx
+++ b/webapp/components/rhs_root_post.jsx
@@ -55,8 +55,8 @@ export default class RhsRootPost extends React.Component {
render() {
const post = this.props.post;
const user = this.props.user;
- var isOwner = user.id === post.user_id;
- var isAdmin = Utils.isAdmin(user.roles);
+ var isOwner = this.props.currentUser.id === post.user_id;
+ var isAdmin = Utils.isAdmin(this.props.currentUser.roles);
var timestamp = UserStore.getProfile(post.user_id).update_at;
var channel = ChannelStore.get(post.channel_id);
@@ -286,5 +286,6 @@ RhsRootPost.defaultProps = {
RhsRootPost.propTypes = {
post: React.PropTypes.object.isRequired,
user: React.PropTypes.object.isRequired,
+ currentUser: React.PropTypes.object.isRequired,
commentCount: React.PropTypes.number
};