mirror of
https://github.com/vale981/Vulcan
synced 2025-03-10 12:36:39 -04:00
23 lines
No EOL
649 B
JavaScript
23 lines
No EOL
649 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 CanEditPost = ({user, post, children}) => {
|
|
// if (Users.canEdit(user, post)) {
|
|
// return children;
|
|
// } else if (!user){
|
|
// return <p>Please log in.</p>;
|
|
// } else {
|
|
// return <p>Sorry, you do not have permissions to edit this post at this time</p>;
|
|
// }
|
|
// };
|
|
|
|
// CanEditPost.propTypes = {
|
|
// user: React.PropTypes.object,
|
|
// post: React.PropTypes.object
|
|
// }
|
|
|
|
// CanEditPost.displayName = "CanEditPost";
|
|
|
|
// module.exports = CanEditPost;
|