Support plugin specific configuration

Created on 7 May 2024, 7 months ago
Updated 10 May 2024, 7 months ago

Problem/Motivation

Client plugins cannot extend the configuration form.

Proposed resolution

Conditionally include a plugin's form in \Drupal\oauth2_client\Form\Oauth2ClientForm if the plugin implements \Drupal\Core\Plugin\PluginFormInterface.

✨ Feature request
Status

Postponed

Version

4.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States westsonoma

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

Comments & Activities

  • Issue created by @westsonoma
  • πŸ‡ΊπŸ‡ΈUnited States fathershawn New York

    I think the approach here will be to support client plugins that implement \Drupal\Core\Plugin\PluginFormInterface and conditionally include a plugin's form in \Drupal\oauth2_client\Form\Oauth2ClientForm. This would allow client plugins to define additional configuration.

    Example:

    • \Drupal\user\Plugin\Action\ChangeUserRoleBase::buildConfigurationForm
    • \Drupal\action\Form\ActionFormBase line 81

    I don't have space right now to add but I'm happy to review any code or work on it when I have time.

  • Status changed to Postponed 7 months ago
  • πŸ‡ΊπŸ‡ΈUnited States fathershawn New York
  • πŸ‡ΊπŸ‡ΈUnited States fathershawn New York

    I also expect that in your case, you would want to store the email address in TempStore ( user specific ) rather than configuration which would be site wide.

  • πŸ‡ΊπŸ‡ΈUnited States westsonoma

    The email address in question is the one used by the site for sending out password reset emails, etc. It's not user-specific.

    Your response made me realize, however, that the address I'm looking for is the email address entered on the "Basic site settings" page, which is presumably the address used by PHPMailer to send mail (I need to confirm that). In any case, the address is already collected and stored either by Drupal or by PHPMailer, so there's no need to ask for it again. I just need to modify the code to retrieve the site email address, and make it clear in the README that the site address must match the address used to sign in to Google Workspace.

    Thanks.

  • πŸ‡ΊπŸ‡ΈUnited States westsonoma

    I've changed the code, and it works fine. As far as I'm concerned, this can be closed.

    Thanks again.

  • πŸ‡ΊπŸ‡ΈUnited States fathershawn New York

    Thanks for the update. I'll leave this postposponed, and updated to be more general as a feature idea.

  • πŸ‡ΊπŸ‡ΈUnited States fathershawn New York
Production build 0.71.5 2024