Add access controls to vertex custom search pages

Created on 11 June 2024, 5 months ago

Problem/Motivation

There are two reasons why implementing some access controls around vertex ai search pages is needed:
1. While pages can be setup locally and pushed up via configuration to production, it would be useful to be able to create a new Vertex custom page on production and to be able to hide it until ready to make it available. This means the page would be enabled, but only visible to certain roles until ready to launch.
2. There may be multiple Vertex-oriented search pages on a site, communicating with different vertex apps. Some of these pages should be available only to internal roles and not available to the public.

Steps to reproduce

1. Create a new Vertex AI Search page and enable it.
2. Go to the search page as an anonymous user and it is visible and available.

Proposed resolution

There should probably be a configuration element on each Vertex AI Search page for selecting the Roles that can use the search page.

The VertexAISearch Plugin will need to implement Drupal\Core\Access\AccessibleInterface. An example of this is the plugin that provides for User search, Drupal\user\Plugin\Search\UserSearch.

User interface changes

Changes would only happen to the administration interface - an additional element added to the Vertex AI Search page configuration form. The element will allow the selection of Roles that may use the search page.

API changes

Data model changes

✨ Feature request
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States tzura

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024