YunoHost / issues

General issue tracker for the YunoHost project
71 stars 8 forks source link

Can't save new value on Config panel #2331

Open Josue-T opened 4 months ago

Josue-T commented 4 months ago

Describe the bug

Hello,

This issue is impacting the synapse config panel but probably some others apps are impacted by this issue.

There are a part of the config panel of synapse.

...
        [main.welcome.enable_registration]
        ask = "Enable Registration for new users."
        type = "boolean"
        yes = "true"
        no = "false"
        help = "Defaults to 'false'. If 'true', it is highly recommended to use either captcha, email, or token-based verification to avoid SPAM."

        [main.welcome.password_enabled]
        ask = "Enable Password Login?"
        type = "boolean"
        yes = "true"
        no = "false"
        help = "If disabled, Login with Non-YunoHost Users impossible. But it simplies Login process if your Matrix server only has YunoHost SSO Users."
        visible = "! enable_registration"

...

On the issue that when we apply a new value for the password_enabled from the webadmin it don't take effect and the new value is just the older one. After some investigation it's liked to the line visible = "! enable_registration". If we remove it it work correctly. On other side if we use just visible = "enable_registration" this work correctly (except that here we don't want to show the panel when the enable_registration is disabled).

I think it's probably linked to this part of code https://github.com/YunoHost/yunohost/blob/f130f4fc5686bedb526e015ced924d4bc887df1b/src/utils/configpanel.py#L576-L583 but didn't take time to exactly understand what happen here and what is expected.

To reproduce

Expected behavior

Gredin67 commented 4 months ago

ping @zamentur