// Deprecated way to handle permission in components, check CanDo component // import React, { PropTypes, Component } from 'react'; // import Users from 'meteor/nova:users'; // const CanView = ({user, children}) => { // if (Users.canDo(user, "posts.view.approved.all")) { // return children; // } else if (!user){ // return
Please log in.
; // } else { // returnSorry, you do not have permissions to post at this time
; // } // }; // CanView.propTypes = { // user: React.PropTypes.object // } // CanView.displayName = "CanView"; // module.exports = CanView;