Generate buttons being applied too broadly

Created on 23 July 2023, over 1 year ago
Updated 8 November 2023, about 1 year ago

Problem/Motivation

Currently the code check for the form_alter in openai_content.module is:

if ($form_object instanceof ContentEntityFormInterface && $account->hasPermission('access openai content tools')) {

The check against "ContentEntityFormInterface" is too broad, and is allowing the form to show in places where it shouldn't, such as Media, Taxonomy Term and Comment creation.

Proposed resolution

My initial thought would be creating an Administative interface listing the "ContentEntityFormInterface" that are available, or more likely, just listing the sites Content Types, and have an Administrator check a box against each one they want it available against.

I'm happy to build this, but wanted peoples feedback before I started.

✨ Feature request
Status

Fixed

Version

1.0

Component

User interface

Created by

πŸ‡¦πŸ‡ΊAustralia Toby Wild

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

Comments & Activities

Production build 0.71.5 2024