Knowledge Base

Access Control Content Type

Last Modified:
20 Jan 2021
User Level:
Administrator +

Description

The Access Control Content Type is a System Content Type. When enabled, it adds options onto the Access tab when creating or editing a section to restrict access to the published section.

This document explains how to create or edit the Access Control Content Type. For a more detailed description of Access Control configuration, refer to our article on the Access Control Module.

Configuration

To check whether an Access Control Content Type already exists, go to Access Control Configuration at System administration > Set up sites & channels > Access control.

If an Access Control Content Type has been created, it will be listed and selected in the dropdown with other System Content Types:

Access Control Content Types

If there is no Content Type selected or listed, then you can create a new Access Content Type.

Create an Access Control Content Type

  1. Create a new Content Type; you can name this "Access Control" or give it another name
  2. The most common Content Element used for Access Control is a Group Select element, which allows the Section to be restricted based on a Group name. All elements should be non-compulsory. This allows users to leave the access control tab blank, and inherit access from a parent Section. The element settings would look like this:
NameTypeRequiredMaximum Size
Group Select Group Select No Default

Screenshot of the Access Control Content Type Content Elements

Convert the Content Type to a System Content Type

  1. When the Content Type has been saved note the Content Type ID. This can be copied from the Content Type listing page:
    Content Type ID on Listing Page
  2. To convert the Content Type into a System Content Type, run the following SQL statement on the database (you may need to ask the team or person or team that manages your Terminalfour database):
    UPDATE template SET template_type=30 WHERE id=<CONTENT TYPE ID>
  3. Return to System Administration > Set up sites & channels > Access control and select the Content Type as the Access Control Content Type:
    Access Control Content Type selected

When creating or editing a Section, you should now see the options on the Access tab if Access Control is Enabled for the section.

Edit an Access Control Content Type

To edit an existing Access Control Content Type, navigate to Assets > Content Type and note the ID of the Content Type. Since it's a System Content Type, it is not editable. 

Once the SQL to turn the Content Type into a non-System Content Type is run, the options will no longer be shown when creating or editing Sections.
The Content Type should be edited and turned back into a System Content Type as quickly as possible.

  1. Convert a System Content Type to a non-System Content Type
    To convert the Access Control Content Type to a non-System Content Type, the person or team that manages your Terminalfour database will need to run the following SQL on the database:

    UPDATE template SET template_type=10 WHERE id=<CONTENT TYPE ID>
  2. Edit the Content Type and add/edit the elements/fields that are required to store the access control.
  3. Convert the Content Type back to System Content Type
    Once you have created/edited the Content Type with the desired fields, convert it back into a System Type. The person or team that manages your Terminalfour database will need to run the following SQL on the database:

    UPDATE template SET template_type=30 WHERE id=<CONTENT TYPE ID>

When creating or editing a Section, you should now see the extra elements you defined within the Content Type.