Plone/Volto permissions for content type

Good afternoon, Plone community!

In the index.js file for a Volto addon, is there a way to set the content type permissions like there was in the plone backend, without using Volto blocks?

I thank you kindly.

Sincerely,

rbrown12

Here is the code I used for the index.js file below:

// Listing Views
import DocListView from './components/ListingViews/DocList';
// Content Types Views
import Admissions from './components/ContentTypesViews/Admissions';
import Bursar from './components/ContentTypesViews/Bursar';
import ChildcareCenter from './components/ContentTypesViews/ChildcareCenter';
import FinancialAid from './components/ContentTypesViews/FinancialAid';
import Health from './components/ContentTypesViews/Health';
import HR from './components/ContentTypesViews/HR';
import Learning from './components/ContentTypesViews/Learning';
import Provost from './components/ContentTypesViews/Provost';
import Registrar from './components/ContentTypesViews/Registrar';
import ReliefFund from './components/ContentTypesViews/ReliefFund';
import SEEK from './components/ContentTypesViews/SEEK';
import TRIO from './components/ContentTypesViews/TRIO';
import OSAS from './components/ContentTypesViews/OSAS';
// Customization Views
import Header from './customizations/components/theme/Header/Header';
import Toolbar from './customizations/components/manage/Toolbar/Toolbar';
import Login from './customizations/components/theme/Login/Login';
import Footer from './customizations/components/theme/Footer/Footer';
import Logo from './customizations/components/theme/Logo/Logo';
import Navigation from './customizations/components/theme/Navigation/Navigation';
// HomePage and Layout Views
import HomePage from './components/HomePage';
import Workflow from './components/ContentStatusHistory/Workflow';
import History from './components/History/History';
import PDFViews from './components/PDFViews/PDFViews';
import ContentListingView from './components/ContentTypesViews/ContentListingView';
import TableBody from './components/ContentTypesViews/TableBody';
import Voting from '../../volto-yc-voting/src/components/Voting/Voting';

export default function applyConfig(config) {
  // Add here your project's configuration here by modifying `config` accordingly
  config.views.contentTypesViews.voting = Voting;
  config.views.contentTypesViews.content_listing_view = ContentListingView;
  config.views.contentTypesViews.table_body = TableBody;
  config.views.contentTypesViews.workflow = Workflow;
  config.views.contentTypesViews.history = History;
  config.views.contentTypesViews.pdf_views = PDFViews;
  config.views.contentTypesViews.toolbar = Toolbar;
  config.views.contentTypesViews.login = Login;
  config.views.contentTypesViews.footer = Footer;
  config.views.contentTypesViews.logo = Logo;
  config.views.contentTypesViews.navigation = Navigation;
  config.views.contentTypesViews.header = Header;
  config.views.contentTypesViews.view = DocListView;
  config.views.contentTypesViews.admissions = Admissions;
  config.views.contentTypesViews.admissions_docs = DocListView;
  config.views.contentTypesViews.bursar = Bursar;
  config.views.contentTypesViews.bursar_docs = DocListView;
  config.views.contentTypesViews.change_of_grade = DocListView;
  config.views.contentTypesViews.childcare_center = ChildcareCenter;
  config.views.contentTypesViews.childcare = DocListView;
  config.views.contentTypesViews['Financial Aid'] = FinancialAid;
  config.views.contentTypesViews['Financial Aid Docs'] = DocListView;
  config.views.contentTypesViews.health = Health;
  config.views.contentTypesViews.health_docs = DocListView;
  config.views.contentTypesViews.hr = HR;
  config.views.contentTypesViews.hr_docs = DocListView;
  config.views.contentTypesViews.learning = Learning;
  config.views.contentTypesViews.learning_docs = DocListView;
  config.views.contentTypesViews.provost = Provost;
  config.views.contentTypesViews.registrar = Registrar;
  config.views.contentTypesViews.registrar_docs = DocListView;
  config.views.contentTypesViews.relief_fund = ReliefFund;
  config.views.contentTypesViews.relief_fund_docs = DocListView;
  config.views.contentTypesViews.seek = SEEK;
  config.views.contentTypesViews.seek_docs = DocListView;
  config.views.contentTypesViews.trio = TRIO;
  config.views.contentTypesViews.trio_forms = DocListView;
  config.views.contentTypesViews.eoc = DocListView;
  config.views.contentTypesViews.osas = OSAS;
  config.views.contentTypesViews.osas_docs = DocListView;
  config.views.defaultView = HomePage;
  config.settings.security = {
    addPermission: [],
    view: [],
  };
  return config;
}

All security-related things are still configured in the Plone backend, including content type add/edit permissions. You don't want to have Volto have any say in this, as it's relatively easy for anybody to run a modified copy of your JS code.

Plone Foundation Code of Conduct