Skip to content

default property should not be force to string #100

@pengu-fr

Description

@pengu-fr

We can not use the "default" property for is_admin, readOnly or canCreate, because the "default" property is forced to be of type string.

Config :

"ep_openid_connect": {
  "issuer": "https://idp.xxxx.xx/auth/realms/xxxxxx",
  "client_id": "etherpad",
  "client_secret": "*****************",
  "base_url": "https://***.*******.**",
  "scope": ["openid"],
  "user_properties": {
    "displayname": {"claim": "name"},
    "is_admin": {
      "claim": "etherpad_is_admin",
      "default": false
    },
    "readOnly": {"default": false},
    "canCreate": {"default": true}
  }
}

In the logs :

[2023-01-25 14:04:49.581] [ERROR] plugin:ep_openid_connect - Invalid settings. Detailed validation errors: [
  {
    instancePath: '/user_properties/is_admin/default',
    schemaPath: '/optionalProperties/user_properties/values/optionalProperties/default/type',
    keyword: 'type',
    params: { type: 'string', nullable: false },
    message: 'must be string'
  }
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions