-
Notifications
You must be signed in to change notification settings - Fork 7.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add --local
mode support to MMCTL for user preferences
#26864
Comments
@mattermod @amyblais Can I work on this issue? |
Have a query from the issue description
@mattermod @amyblais We are already skipping session checks for requests from local mode here . Why we should explicitly remove session checks from the local handler here? |
cc @isacikgoz |
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: