volto icon indicating copy to clipboard operation
volto copied to clipboard

WIP: Self registration tests

Open JeffersonBledsoe opened this issue 1 year ago โ€ข 3 comments

JeffersonBledsoe avatar Jul 26 '24 01:07 JeffersonBledsoe

Deploy Preview for plone-components canceled.

Name Link
Latest commit 238fb56b8e04bb6e2a5a54fe66a075828447714a
Latest deploy log https://app.netlify.com/sites/plone-components/deploys/66a2fb66c99b7e000883318b

netlify[bot] avatar Jul 26 '24 01:07 netlify[bot]

@davisagli I'm trying to add a test to reflect the changes in https://github.com/plone/volto/pull/5935, but I'm getting the following error from the backend:

{
  "error": {
    "errors": [
      {
        "field": "sendPasswordReset",
        "message": "Property 'Send a confirmation mail with a link to set the password' is not allowed."
      }
    ],
    "message": "Error in fields. Property 'Send a confirmation mail with a link to set the password' is not allowed.",
    "type": "WrongParameterError"
  }
}

This is with the following request:

POST http://127.0.0.1:55001/plone/++api++/@users {"fullname":"Placeholder name","email":"[email protected]","sendPasswordReset":true}. Toggling Let users select their own passwords doesn't help. Any suggestions as to why this might be failing?

JeffersonBledsoe avatar Jul 26 '24 01:07 JeffersonBledsoe

@JeffersonBledsoe Currently sendPasswordReset is only allowed in the REST API if the current user has permission to manage users. (https://github.com/plone/plone.restapi/blob/main/src/plone/restapi/services/users/add.py#L75)

I don't see a reason to restrict it in that way. It should be possible to request a password reset email regardless of whether the user is being added by an admin or self-registering. I'd accept a PR to plone.restapi to make that change.

davisagli avatar Aug 03 '24 00:08 davisagli

Hi There! ๐Ÿ‘‹

We haven't seen any activity on this pull request in a while :sleeping:, and we want to make sure that it's still relevant. Please let us know by:

  • adding a comment about what needs to be done next ๐Ÿ’ฌ
  • updating its status and other labels ๐Ÿท๏ธ

Otherwise close this pull request. ๐Ÿงน

github-actions[bot] avatar Mar 27 '25 00:03 github-actions[bot]