Skip to content
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

Open
mattermod opened this issue Apr 24, 2024 · 4 comments
Open

Add --local mode support to MMCTL for user preferences #26864

mattermod opened this issue Apr 24, 2024 · 4 comments
Assignees
Labels
Help Wanted Community help wanted

Comments

@mattermod
Copy link
Contributor

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

@mattermod mattermod added Help Wanted Community help wanted Up For Grabs labels Apr 24, 2024
@kaoski
Copy link
Contributor

kaoski commented Apr 26, 2024

@mattermod @amyblais Can I work on this issue?

@kaoski
Copy link
Contributor

kaoski commented May 1, 2024

Have a query from the issue description

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

@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?

@amyblais
Copy link
Member

amyblais commented May 1, 2024

Have a query from the issue description

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

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

@kaoski
Copy link
Contributor

kaoski commented May 8, 2024

PR: #26972
cc: @amyblais

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help Wanted Community help wanted
Projects
None yet
Development

No branches or pull requests

3 participants