diff --git a/lib/react/user.jsx b/lib/react/user.jsx index bcc6726..fbddb2e 100644 --- a/lib/react/user.jsx +++ b/lib/react/user.jsx @@ -226,3 +226,27 @@ var CurrentUser = React.createClass({ } }); +var AssumeUserIdButton = React.createClass({ + assumeId(e) { + e.preventDefault(); + if (this.props.gatherer) { + socket.emit("users:authorize", { + id: this.props.gatherer.id + }); + // Refresh Gather list + setTimeout(() => { + socket.emit("gather:refresh"); + }, 5000); + } + }, + + render() { + let currentUser = this.props.currentUser; + let gatherer = this.props.gatherer; + if (currentUser && gatherer) { + return + } + } +}); \ No newline at end of file