This is a sub-issue of #1910624: [META] Introduce and complete configuration schemas in all of core.

Problem/motivation

#1866610: Introduce Kwalify-inspired schema format for configuration introduced some config schema coverage for user module, but it is not complete. The changelog leads to (hopefully extensive) documentation on the format at http://drupal.org/node/1905070. While there are little cleanups planned for the format overall, the current format is a result of months of back and forths, so it should be perfectly fine to apply it more widely to core.

Proposed solution

Figure out the missing pieces that are not yet covered. Write schema file sections for them. Clean up / fix any issues in current schema.

Schema in place
user.mail.yml
user.settings.yml
user.flood.yml
user roles

Schema not yet in place

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

adammalone’s picture

Here's a patch that adds in the additional schemas.

adammalone’s picture

Status: Active » Needs review
adammalone’s picture

Actually... this patch would adhere more to kwalify formats since user roles should be user.role.*

Gábor Hojtsy’s picture

Gábor Hojtsy’s picture

Status: Needs review » Needs work
+++ b/core/modules/user/config/user.schema.ymlundefined
@@ -73,3 +73,33 @@ user.settings:
+  mapping:
+    "id": "Role ID"
+    "label": "Role Label"

No type on these?

Also are these the actual labels on the UI? Title cased? Drupal does not usually use title cased naming on the UI. Same true for the other part added (as well as the header "User Roles").

adammalone’s picture

Assigned: Unassigned » adammalone

I'll have another go over these. I wasn't aware that the label/id had to be linked to that in the UI.

vijaycs85’s picture

Status: Needs work » Needs review
FileSize
4.63 KB

Adding additional schemas with code style fixes.

guy_schneerson’s picture

Status: Needs review » Needs work

Removed - not applicable

vijaycs85’s picture

error: core/modules/user/config/user.schema.yml: No such file or directory

doesn't sound like patch in #7.

Fixed few labels as per UI.

guy_schneerson’s picture

Sorry vijaycs85 you are right, I removed #8 and Tested your latest patch in #9 and found only two small Issues:

  1. register uses an "enum" key and as far as I know we have no support for enumerations at this point and the configuration form should handle it. I think all thats needed is to remove the enum line
  2. register_pending_approval_admin is missing in the "user.mail:" section
vijaycs85’s picture

Status: Needs work » Needs review
FileSize
808 bytes
4.73 KB

Thank you @guy_schneerson. Updated patch to accommodate changes mentioned in #10. Good catch :)

guy_schneerson’s picture

Status: Needs review » Needs work

Great job @vijaycs85, the interdiff makes it real easy to review.

Not sure if I missed it before or if it was added recently but we are also missing password_strength from the user.settings.yml (this was recently added to allow disabling of the password strength indicator) and is a boolean.

Sorry if i missed it before - setting status to "needs a tiny bit more work :)"

vijaycs85’s picture

Status: Needs work » Needs review
FileSize
497 bytes
4.82 KB

Thanks again @guy_schneerson. added password_strength.

guy_schneerson’s picture

Status: Needs review » Reviewed & tested by the community

Looks great @vijaycs85

  • Patch applied cleanly
  • All settings are accounted for and are of the correct type in the user.schema.yml
  • The configuration inspector tool produces forms with all settings and labels

Also updated the issue description and moved moved user.flood.yml & user roles into the "Schema in place" section as you have implemented those.

Not sure if anyone else needs to review but setting it to "Reviewed & tested by the community" so sett it back if you think it needs more review.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 8.x. Thanks.

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

Anonymous’s picture

Issue summary: View changes

Updated issue summary.