Permission for API Key Configuration in Formstack Module

Created on 19 December 2023, 11 months ago

Problem/Motivation

Currently, in the Drupal Formstack module, there is no permission setting available for configuring Formstack API keys. This lack of permission control means any user with access to the configuration page can add or change the API key, potentially causing security and management issues.

Steps to reproduce

  1. Install and enable the Formstack module in Drupal.
  2. Navigate to the Formstack configuration page.
  3. Observe that any user with access to this page can add or modify the API key.

Proposed resolution

Introduce a new permission called 'administer formstack settings'. This permission should be required to access the Formstack configuration form. The implementation includes:

  • Adding a new permission in formstack.permissions.yml.
  • Ensuring the routing file (formstack.routing.yml) specifies this permission as a requirement for accessing the configuration form.

A patch (formstack_admin_permission_restriction_3.0alpha.patch) has been created to implement these changes.

Remaining tasks

  • Review the proposed patch for accuracy and adherence to Drupal coding standards.
  • Test the patch in different environments to ensure it works as expected.
  • Commit the patch to the Formstack module after successful review and testing.

User interface changes

The only user interface change is that non-admin users (or users without the 'administer formstack settings' permission) will now be denied access to the Formstack configuration page, enhancing security and proper management.

API changes

No direct API changes. The update solely revolves around access control via permissions.

Data model changes

No data model changes are required.

Feature request
Status

Active

Version

3.0

Component

Code

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

Comments & Activities

Production build 0.71.5 2024