Knowledge Base

Access Control Content Type

Last Modified:
31 May 2019
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, but for a more detailed description of the configuration of Access Control, refer to our article on the Access Control Module.

Configuration - Content Type Set Up

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

If no Content Type is selected for the Access control content type option, then create a new Access Content Type. If a Content Type is selected, then edit an existing Access Control Content Type.

Creating an Access Control Content Type

  1. Create a new Content Type called, for example, "Access Control".
  2. Add the elements/fields required to restrict access. The most common for access control is a Group Select element, that allows the Section to be restricted based on a group. All elements should be non-compulsory. This allows users to leave the access control tab blank, inheriting the access from the parent section. For example:
NameTypeRequiredMaximum Size
Group Select Group Select No Default

Screenshot of the Access Control Content Type Content Elements

  1. Note the Content Type ID.
  2. To convert it into a 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=30 WHERE id=<CONTENT TYPE ID>

  3. Go to System Administration > Set up sites & channels > Access control and select the Content Type as the Access control content type.

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. To edit it, you will need to turn it into a non-System Content Type. This is done with a SQL statement run on the TERMINALFOUR database.  When the edits are made, another SQL statement is run to turn it back into a System Content Type.

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. To change it into 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. 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.