Add --local
mode support to MMCTL for user preferences
#26864
Labels
Help Wanted
Community help wanted
--local
mode support to MMCTL for user preferences
#26864
Recently a feature was added to MMCTL for user preferences so that you can list this data and manipulate it. https://github.com/mattermost/mattermost/pull/25721
This feature does not yet work when using MMCTL in
--local
mode.It would make sense to implement this for local mode as well and maintain feature parity. To enable this feature to work with the local mode, we need to register these API endpoints to the local router. Similar to what has been done here: https://github.com/mattermost/mattermost/blob/master/server/channels/api4/user_local.go
Since there is no authentication/authorization in local mode, the API handlers needs to be stripped from session checks: https://github.com/mattermost/mattermost/blob/master/server/channels/api4/preference.go
Lastly the https://github.com/mattermost/mattermost/blob/master/server/channels/api4/preference_test.go file needs to be updated to test local mode. It can be achieved by using
TestForSystemAdminAndLocal
utility implemented here: https://github.com/mattermost/mattermost/blob/master/server/channels/api4/apitestlib.go#L982 .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.
JIRA: https://mattermost.atlassian.net/browse/MM-56819
The text was updated successfully, but these errors were encountered: