Граф коммитов

11 Коммитов

Автор SHA1 Сообщение Дата
Ibrahim Serdar Acikgoz
e69a2a41ca [MM-28210] sqlstore/user_store: filter deleted users for GetProfilesInChannel (#15390)
* sqlstore/user_store: filter deleted users for GetProfilesInChannel

* allow GetProfilesInChannel use userGetOptions

* sqlstore/user_store: add more test cases

* store/user_store: refine filter
2020-09-16 11:04:17 +03:00
Ibrahim Serdar Acikgoz
c30fea5f2d [MM-25645] api4/user: add migrate_auth endpoints (#14966)
* api4/user: add migrate_auth endpoints

* api4/user: reflect review comments

* add translations

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-08-31 14:56:36 +03:00
Gabe Jackson
90ef61f74c Add functionality to update password with password hash (#15343)
* Add functionality to update password with password hash

This can be used to update a user's password with a direct password
hash instead of providing the password in plaintext.

* Use test helper for local mode
2020-08-26 17:28:00 +02:00
Miguel de la Cruz
46207a35f5 [MM-27130] Add local implementations for get user related endpoints (#15070)
Automatic Merge
2020-07-23 12:53:35 +02:00
Miguel de la Cruz
6b5c0bb5d2 [MM-27170] Migrate verify user by id endpoint to local mode (#15091)
* [MM-27170] Migrate verify user by id endpoint to local mode

* Update api4/user_test.go

Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>

Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
2020-07-22 18:27:44 +02:00
Ashish Bhate
7602dc0b19 [MM-25647]: ability to permanently delete users (#14944)
Summary:
    Config option to allow permanent user deletion ServiceSettings.EnableAPIUserDeletion
    Expose permanent user deletion through API
    Local mode for delete user for use in mmctl

Ticket Link:
    Server part of https://mattermost.atlassian.net/browse/MM-25647
2020-07-22 17:32:23 +05:30
Ibrahim Serdar Acikgoz
6a4e3293f8 [MM-25648] api4: add user/bot convert endpoints (#14877)
* api4: add user/bot convert endpoints

* api4: add convert user/bot to local mode

* api4: fix linting issues

* api4/bot: reflect review comments

* api4: update convert user endpoint paths

* remove shadow decl

* fix translation problems
2020-07-17 10:00:43 +03:00
Miguel de la Cruz
eff2209a7e [MM-25646] Adds the permanent delete all users endpoint to the local API (#14903)
* [MM-25646] Adds the permanent delete all users endpoint to the local API

* Add a check to ensure that teams and channels are not deleted

* Fix linter

* Fix audit record name for consistency with method name

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-06-27 23:00:01 +02:00
Ashish Bhate
f3ac33e6dc MM-25078: local mode for createUserAccessToken, revokeUserAccessToken and getUserAccessTokensForUser (#14680)
Summary
- local mode for createUserAccessToken
- local mode for revokeUserAccessToken
- local mode for getUserAccessTokensForUser, also removed a duplicate test.

Ticket Link
- https://mattermost.atlassian.net/browse/MM-25078
- https://mattermost.atlassian.net/browse/MM-25079
- https://mattermost.atlassian.net/browse/MM-25080
2020-06-12 16:29:05 +05:30
Ashish Bhate
d5e9fde8d7 MM-24865: local mode for some user handlers (#14511)
Summary
- Local mode handler for createUser
- Local mode handler for updateUser
- Local mode support for updateUserRoles
- Local mode support for sendPasswordReset
- Local mode support for updateUserMfa
- Local mode support for updateUserActive

Ticket Link
- https://mattermost.atlassian.net/browse/MM-24865
- https://mattermost.atlassian.net/browse/MM-24869
- https://mattermost.atlassian.net/browse/MM-24866
- https://mattermost.atlassian.net/browse/MM-24868
- https://mattermost.atlassian.net/browse/MM-24870
- https://mattermost.atlassian.net/browse/MM-25041
2020-06-12 12:05:09 +05:30
Ibrahim Serdar Acikgoz
0965e8485a [MM-24594] api4/channel: add/remove member & get public/deleted chs for local-mode (#14590)
* [MM-24146] Add unix socket listener for mmctl local mode (#14296)

* add unix socket listener for mmctl local mode

* add a constant for local-mode socket path

* reflect review comments

* [MM-24401] Base approach for Local Mode (#14333)

* add unix socket listener for mmctl local mode

* First working PoC

* Adds the channel list endpoint

* Add team list endpoint

* Add a LocalClient to the api test helper and start local mode

* Add helper to test with both SystemAdmin and Local clients

* Add some docs

* Adds TestForAllClients test helper

* Incorporating @ashishbhate's proposal for adding test names to the helpers

* Fix init errors after merge

* Adds create channel tests

* Always init local mode to allow for enabling-disabling it via config

* Check the RemoteAddr of the request before marking session as local

* Mark the request as errored if it's local and the origin is remote

* Set the socket permissions to read/write when initialising

* Fix linter

* Replace RemoteAddr check to ditch connections with the IP:PORT shape

Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>

* Fix translations order

* [MM-24832] Migrate plugin endpoints to local mode (#14543)

* [MM-24832] Migrate plugin endpoints to local mode

* Fix client reference in helper

* [MM-24776] Migrate config endpoints to local mode (#14544)

* [MM-24776] Migrate get config endpoint to local mode

* [MM-24777] Migrate update config endpoint to local mode

* Fix update config to bypass RestrictSystemAdmin flag

* Add patchConfig endpoint

* MM-24774/MM-24755: local mode for addLicense and removeLicense (#14491)

Automatic Merge

* api4/channel: add/remove member & get public/deleted chs for local-mode

* api4/channel_local: reflect review comments

Co-authored-by: Miguel de la Cruz <miguel@mcrx.me>
Co-authored-by: Ashish Bhate <bhate.ashish@gmail.com>
Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-06-03 12:20:52 +03:00