Problem/Motivation

Whilst working testing on some recipes today I noticed that the schema file for this module is not valid. The mapping for roles is of type "checkboxes", which isn't a valid property in schema documents.

Steps to reproduce

I was running a functional test for a recipe and this issue came to light.

Proposed resolution

I've fixed this by changing the schema type to "string", which matches how some other role configurations work in Drupal. In addition to this I also needed to set the default configuration file to store strings (ie. instead of 0 it is '0').

This allowed the test I was working on to pass.

I'll get a MR in asap for this :)

Remaining tasks

I'm assuming that tests will pass with this in place. I'll create an MR and investigate if they don't.

User interface changes

n/a

API changes

n/a

Data model changes

This shouldn't effect the model. Role machine names are strings.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

philipnorton42 created an issue. See original summary.

philipnorton42’s picture

Looks like that failed the tests for the module. Let me look into that.

philipnorton42’s picture

Status: Active » Needs review

The test failure was unrelated to my change, and is something that Drupal 11 introduced. Apparently, I needed to add the content type name to the creation of the content type or it will crash the page on the content edit screen.

Unit tests are now passing.

I also added a change based on https://www.drupal.org/node/3548485 to remove a deprecation error.

There are some coding style issues picked up by the automation, but they are outside the remit of this issue.

markconroy’s picture

Status: Needs review » Needs work

Thanks for this @philipnorton42

I'm getting an error when trying to checkout the branch with
git checkout -b '1.0.x' --track content_access_by_path-3572762/'1.0.x'
since 1.0.x already exists as a branch.

I think it should be something like
git checkout -b '3572762-schema-of-configuration' --track content_access_by_path-3572762/'3572762-schema-of-configuration'

The code itself looks fine, so I'll be happy to merge it once we have that fixed.

philipnorton42’s picture

Status: Needs work » Needs review

I think that sorted the issue. The MR is now using the branch`3572762-schema-of-configuration` on my issue fork.

markconroy’s picture

Version: 1.1.0 » 1.0.x-dev
Status: Needs review » Fixed

Thanks @philipnorton42

That's merged now.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.