mirror of
https://github.com/vale981/Vulcan
synced 2025-03-09 20:16:39 -04:00
23 lines
No EOL
687 B
JavaScript
23 lines
No EOL
687 B
JavaScript
// Deprecated way to handle permission in components, check CanDo component
|
|
|
|
// import React, { PropTypes, Component } from 'react';
|
|
// import Users from 'meteor/nova:users';
|
|
|
|
// const CanViewPost = ({user, post, children}) => {
|
|
// if (Users.canView(this.props.user, this.props.document)) {
|
|
// return this.props.children;
|
|
// } else if (!this.props.user){
|
|
// return <p>Please log in.</p>;
|
|
// } else {
|
|
// return <p>Sorry, you do not have permissions to post at this time</p>;
|
|
// }
|
|
// };
|
|
|
|
// CanViewPost.propTypes = {
|
|
// user: React.PropTypes.object,
|
|
// post: React.PropTypes.object
|
|
// }
|
|
|
|
// CanViewPost.displayName = "CanViewPost";
|
|
|
|
// module.exports = CanViewPost;
|