Skip to content

Add PROGRAM_MAY_MODIFY_SETTINGS setting #26393

Open
@delvh

Description

@delvh

Problem derivation

At the moment, we always need to delegate config changes to the admins of an instance, and refuse to start otherwise.
The reason for that is two-fold:

  1. A settings move might have unintended consequences, so it's better that an admin does it
  2. We don't know if we can write to the app.ini or not, i.e. Docker users and Kubernetes users like to use their app.ini read only once it is initialized.

But what if we would know if we can modify the config? Then we could automate a lot of things that are currently impossible.
So, what I'm proposing is the following:

Solution

As a first step to automating config changes, we can add a PROGRAM_MAY_MODIFY_SETTINGS setting (I guess in the default section) that is true by default (the docker image and helm chart would set it to false by default).
It has the following meaning:

  • false: No change to now
  • true:
    • When INSTALL_LOCK=false, no change to now, so treat it just like false above
    • When Gitea is installed already, Gitea can arbitrarily change the config and persist the changes

Advantages

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/proposalThe new feature has not been accepted yet but needs to be discussed first.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions