<commit_before>import React from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import {
  IfInterface,
  IfPermission,
} from '@folio/stripes/core';

import EditablePermissions from '../../EditablePermissions';

const propTypes = {
  stripes: PropTypes.object.isRequired,
  resources: PropTypes.shape({
    availablePermissions: PropTypes.shape({
      records: PropTypes.arrayOf(PropTypes.object),
    }),
  }).isRequired,
  userPermissions: PropTypes.arrayOf(PropTypes.object),
};

class EditUserPerms extends React.Component {
  static manifest = Object.freeze({
    availablePermissions: {
      type: 'okapi',
      records: 'permissions',
      path: 'perms/permissions?length=1000',
      permissionsRequired: 'perms.permissions.get'
    },
  });

  render() {
    const { resources, userPermissions } = this.props;
    const availablePermissions = (resources.availablePermissions || {}).records || [];<commit_msg>include user permissions here too<commit_after>import React from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import {
  IfInterface,
  IfPermission,
} from '@folio/stripes/core';

import EditablePermissions from '../../EditablePermissions';

const propTypes = {
  stripes: PropTypes.object.isRequired,
  resources: PropTypes.shape({
    availablePermissions: PropTypes.shape({
      records: PropTypes.arrayOf(PropTypes.object),
    }),
  }).isRequired,
  userPermissions: PropTypes.arrayOf(PropTypes.object),
};

class EditUserPerms extends React.Component {
  static manifest = Object.freeze({
    availablePermissions: {
      type: 'okapi',
      records: 'permissions',
      path: 'perms/permissions?length=10000',
      permissionsRequired: 'perms.permissions.get'
    },
  });

  render() {
    const { resources, userPermissions } = this.props;
    const availablePermissions = (resources.availablePermissions || {}).records || [];
{'fraction_non_alphanumeric': 0.1289002557544757, 'fraction_numerical': 0.004603580562659846, 'mean_word_length': 4.300813008130081, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4330481', 'n_tokens_mistral': 542, 'n_tokens_neox': 564, 'n_words': 122}