Modules / Admin & agency

Admin: hide the licence screen

Licence page: hide it from client administrators

Keep Bricks > License, its notices and its licence actions away from administrators on a client site. Only the administrators you choose keep them.

  • Off until you switch it on
  • Needs Bricks 2.4 or newer
  • Tested with Bricks 2.4.3
Recording: someone lets only the admin account see the licence and saves; a second administrator signs in, finds no License item under Bricks, and the licence address answers “Sorry, you are not allowed to access this page.”Recorded in Bricks 2.4.3

How to use it

  1. In Bricks > Kiln, under Admin & agency, turn on Admin: hide the licence screen. Click Save modules. The module is off by default.
  2. Open Settings under the module. Under Administrators who see the licence, tick the administrators who should keep the page. If you tick nobody, every administrator keeps it.
  3. Click Save modules.

If you tick others but not yourself, Kiln adds you. Multisite super admins always keep access.

Chosen users who are deleted, or who lose the manage_options capability, drop out of the list. If that empties the list, every administrator keeps the page again.

Where it appears in Bricks

Bricks > Kiln, in the Settings disclosure under the module.

An administrator who is not chosen sees:

  • No Bricks > License entry in the menu.
  • The message "The licence page is restricted on this site. Ask the administrator who manages the licence." with a 403 response, if they open the page's address.
  • None of Bricks' licence notices.
  • The error "The licence is managed by another administrator." if a licence action is sent to the server. The actions are activate, deactivate, delete the stored key and re-check.
  • The module's row in Bricks > Kiln, with a disabled checkbox and the note "Managed by another administrator." They cannot turn the module off or change who is chosen. The lock stays after a chosen administrator turns the module off, so they cannot turn it back on either.
  • The same lock on the Admin: white label row: the chosen administrators also own the white-label settings.

How it works with Bricks

Bricks shows its licence page (with the key masked) and its licence notices to every administrator. Kiln removes the menu entry, blocks the page, drops the notices that Bricks registers on its licence object, and answers Bricks' licence requests before Bricks does, for administrators who are not chosen.

Kiln also fixes a leak in Bricks 2.4.3. When a remote-templates request fails, Bricks returns the request URL, and that URL carries the full licence key, so any user with builder access receives it. Kiln handles that request itself, with the same nonce check and the same data, minus the request_url entry. This applies to everyone while the module is on, not only to administrators who are not chosen. Kiln does this only while Bricks' own methods for that request exist. If a Bricks update renames them, Kiln leaves the request to Bricks.

What it is not

This is not access control. It hides the licence screen from administrators you did not choose. Any administrator can still read the site's options or install code, so the key is not secret from them.

Limits

  • Kiln removes only the notices Bricks registers on its own licence object and leaves other notices alone.
  • The leak fix covers the remote-templates request. It does not change anything else in Bricks.

Settings

Administrators who see the licence: a list of the site's administrators (up to 500, sorted by display name), each shown as display name and login.

Requirements

Bricks 2.4 or newer.