import _ from 'lodash';

const IfPermission = props =>
  (_.get(props, ['currentPerms', props.perm]) ? props.children : null);

export default IfPermission;

import _ from 'lodash';

const IfPermission = props =>
  (props.stripes.hasPerm(props.perm) ? props.children : null);

export default IfPermission;

Use stripes-core v0.3.0 API for permissions.