Right now the REST API currently only has an endpoint PUT /config that receives a full configuration for the server and applies it. This makes it difficult to make incremental changes to the server's configuration and can also be an issue for any older libraries or drivers that are missing newer config fields.
For this ticket, create a new REST API endpoint PUT /config/patch that uses patch semantics to only update the fields of the config that are provided, while leaving the other fields unchanged.
The config package has a Merge function that will be useful for this.
Please make sure to also update the API documentation here https://github.com/mattermost/mattermost-api-reference
If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Developers" community channel.
New contributors please see our Developer's Guide.
I am working on this issue.
I have few questions. I am referring the update config here: https://github.com/mattermost/mattermost-server/blob/a2adf7b3f5ee106ea81a8996c10e026d87e07e34/api4/config.go#L52-L116
c.App.Config().ExperimentalSettings.RestrictSystemAdmin? If only system admin can update the config why this config was added?Update i.e. not allowing plugin uploads to be toggled via UI and the logic to handle cfg.MessageExportSettings.ExportFromTimestamp?cfg.MessageExportSettings.ExportFromTimestamp?@jwilander Could you please take a look at the question above?
@RajatVaryani good questions
RestrictSystemAdmin is helpful when running a bunch of Mattermost severs in a SaaS style where we don't want system admins to be able to change certain settings, instead of anythingExportFromTimestamp is used for a compliance export feature, I'm not super familiar with the feature but I believe that general idea is when the feature is turned on the timestamp can't be any earlier than the current time because the data to export has been being collected (since the feature was off)
Most helpful comment
I am working on this issue.