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

1446 Коммитов

Автор SHA1 Сообщение Дата
Agniva De Sarker
5db226b2f0 MM-42652: Skip Flaky test in CreateCategoryForTeamForUser (#19857)
https://mattermost.atlassian.net/browse/MM-42652

```release-note
NONE
```
2022-03-29 19:36:50 +05:30
Julien Tant
0babc01749 [MM-41998] Channel Info RHS: display number of files for a channel (#19822)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-03-25 13:28:14 -07:00
Ibrahim Serdar Acikgoz
3e8b81c0c7 graphql: Add channel stats under channel (#19804)
* graphql: Add channel stats under channel

* add permission check
2022-03-25 11:59:57 +03:00
Agniva De Sarker
c1f3827801 MM-38164: Paginate the GetPostThread API (#19485)
We implement a cursor based pagination model
to page through the posts in a given thread.

The cursor is a combination of the post.CreateAt+
post.Id to differentiate multiple posts in a given
timestamp.

Some additional parameters like direction, fromPost,
fromCreateAt and perPage were introduced to implement
this.

```release-note
NONE
```
2022-03-24 12:51:41 +05:30
Ibrahim Serdar Acikgoz
ad5f57b161 api4/system: adjust permissions for applied schema migrations (#19814)
* api4/system: adjust permissions for applied schema migrations

* add a test case
2022-03-23 19:34:03 +03:00
Allan Guwatudde
80ec0a5c21 Fix MM-42643 (#19811)
* Fix MM-42643

* use handler authentication

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-03-22 11:41:31 +03:00
Carrie Warner (Mattermost)
dcd66d2146 MM-41988 Updated links to legacy domain about.mm.com (#19552)
* Updated links to legacy domain about.mm.com

* Legacy link updates

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* about.mm.com URL updates

* mattermost.org URL updates

* forum.mm.org URL update

* Update .github/ISSUE_TEMPLATE.md

* Update .github/ISSUE_TEMPLATE.md

* Un-deleted language files

* Update README.md

* Update tests/test-config.json

* fix some test due to url updating (#19787)

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
2022-03-16 19:47:57 +08:00
Daniel Espino García
c3ec0a145b [GraphQL POC] Omit self from pretty display name (#19783)
* Omit self from pretty display name

* Fix test
2022-03-15 15:18:35 +01:00
Ibrahim Serdar Acikgoz
b03d87af40 [MM-41576] Add schema version to the client configuration (#19757)
* revamp db version and add applied migrations endpoint

* replace old schema version with new

* add db version subcommand

* add to local api

* reflect review comments

* log errors

* remove setting the version from model.CurrentVersion

* fix a test

* use different field for schema version

* add build hash and current version to the support packet

* add tests

* update test to use new assets
2022-03-15 16:39:23 +03:00
Nathaniel Allred
3531432738 Mm 42465 (#19771)
* when plugins are disabled, still allow onboarding to complete
2022-03-11 09:08:49 -06:00
Agniva De Sarker
856f9b11af MM-40817: Use license interface in Channels (#19678)
* MM-40817: Use license interface in Channels

https://mattermost.atlassian.net/browse/MM-40817

```release-note
NONE
```

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-03-10 09:00:29 +05:30
mkraft
06c2aa70b0 MM-42271: Restrict support packet generation to system admin. (#19726) 2022-03-09 11:42:08 -05:00
Allan Guwatudde
d543db6186 [MM-41573] - Remove FF for MM-39060 Resend Invite Interval (#19652)
* [MM-41573] - Remove FF for MM-39060 Resend Invite Interval

* feedback impl
2022-03-09 17:57:25 +03:00
Jesse Hallam
a2a78577e9 Revert "[MM-41576] Revamp database schema version (#19586)" (#19746)
* Revert "[MM-41576] Revamp database schema version (#19586)"

This reverts commit 645fee3fe3.

* Revert "MM-42049 - license endpoint not working (#19686)"

This reverts commit 4fe89e5847.
2022-03-08 16:28:28 -04:00
Ibrahim Serdar Acikgoz
645fee3fe3 [MM-41576] Revamp database schema version (#19586)
* revamp db version and add applied migrations endpoint

* replace old schema version with new

* add db version subcommand

* add to local api

* reflect review comments

* log errors

* remove setting the version from model.CurrentVersion

* fix a test
2022-03-08 18:13:37 +03:00
mkraft
21f1d2aabc MM-42201: Enforce group is not the same as username. (#19660)
* MM-42201: Enforce group is not the same as username.

* MM-42201: Adjust test for change to translation id.
2022-03-08 09:14:22 -05:00
Allan Guwatudde
f6fef9362b Fix MM-42270 (#19692)
* [MM-42270] - Fix MM-42270

* clean test code

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-03-07 18:58:43 +03:00
Agniva De Sarker
a2fc602bc2 MM-40813: Use config service more extensively (#19679)
https://mattermost.atlassian.net/browse/MM-40816

```release-note
NONE
```

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-03-07 20:48:55 +05:30
Agniva De Sarker
cf6aa85d28 MM-42268: We add more fields to Channel and Team (#19675)
Also added sessions as part of the user object

https://mattermost.atlassian.net/browse/MM-42268

```release-note
NONE
```

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-03-07 20:14:53 +05:30
Shaz Amjad
1b41957239 API includes sort_order, and WebSocket includes data (#19157)
* API includes sort_order, and WebSocket includes data

* Adds sort_order API test

* MM-40470: Tests that new WS payload is sent after categories are updated via API.

* Update api4/channel_category_test.go

Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>

Co-authored-by: Martin Kraft <martin@upspin.org>
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
2022-03-04 13:25:15 +01:00
Ben Schumacher
275adc8c30 [MM-41981] Always install the latest compatible version via the Marketplace (#19613) 2022-03-03 22:53:01 +01:00
Ben Cooke
72f937f96b [MM-41907] Don't return custom groups when feature is disabled (#19644)
* tools updates

* Revert "tools updates"

This reverts commit 6293297b55803c5a263e200ebd80192899666ae9.

* dont return custom groups when feature is disabled

* adding small change to test

Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MacBook-Pro.local>
Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MBP.ht.home>
2022-03-03 15:50:17 -05:00
Agniva De Sarker
ab8de49f0a MM-40818: Refactor product initialization to happen late (#19658)
This is more of a general refactor of the initialization
process which should allow us to pass services more
easily.

The changes are minimal to keep the scope limited.
For now, the objective is to pass the file service
to the Channels product. For that, it was required
to move some of the enterprise interfaces under Channels
from Server.

We also create a filestore field in the server to
avoid creating filestore reference every time
we make a filestore operation. This will be later
passed on to the Channels product.

Also removed an unnecessary test. 
The test was working so far because we were creating
the filebackend every time for every request. But
we should go via UpdateConfig call which would fail,
were we to assign an invalid filestore name.

So we were actually testing for a different thing.
Therefore, removed the test.

```release-note
NONE
```
2022-03-03 12:22:10 +05:30
Julien Tant
dd100a3a69 [MM-41785] Show error in invitation popin when email can't be send (#19617)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-03-02 14:26:57 -07:00
Daniel Espino García
32e3c2f0b8 [Gekidou] Add push notification check to ping (#19610)
* Add push notification check to ping

* Add test type and missing details

* Address feedback

* Fix function name

* Address feedback

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-03-02 12:15:58 +01:00
Jesse Hallam
6757edc4e2 MM-41349: CRT, fix LastUpdated semantics (#19523)
* deadcode: remove UpdateChannelLastViewedAt

* deadcode: remove ThreadStore.(Save(Multiple)|Update|Delete)

* deadcode: followThead in App.MarkChannelAsUnreadFromPost

* document ThreadMembership, Thread structs

* maintain LastUpdated consistently

Whenever we touch a `ThreadMembership` record, we should be setting `LastUpdated` to the current timestamp. The mobile client relies on this to detect changes to these records.

* simplify: never updateThreads from `App.MarkChannelAsUnreadFromPost`

Change all invocations of `ChannelStore.UpdateLastViewedAtPost` from `App.MarkChannelAsUnreadFromPost` to pass `updateThreads` as `false`. When `ChannelStore.UpdateLastViewedAtPost` was invoked with `updateThreads` as `true`, it would in turn call `ThreadStore.UpdateUnreadsByChannel` but pass `updateViewedTimestamp` as `false`. This effectively updated the `LastUpdated` field of the corresponding thread memberships but never touched any of the actual data (such as `LastViewed`).

The overall CRT feature continued to work, because `App.MarkChannelAsUnreadFromPost` directly updates the relevant thread memberships via `ThreadStore.MaintainMembership`.

* deadcode: updateThreads in ChannelStore.UpdateLastViewedAtPost

* simplify: never updateThreads from App.SendNotifications

Change all invocations of `ChannelStore.IncrementMentionCount` from
`App.SendNotifications` to pass `updateThreads` as `false`. When `ChannelStore.IncrementMentionCount` was invoked with `updateThreads` as `true`, it would in turn call `ThreadStore.UpdateUnreadsByChannel` but pass `updateViewedTimestamp` as `false`. This effectively updated the `LastUpdated` field of the corresponding thread memberships but never touched any of the actual data (such as `UnreadMentions`).

The overall CRT feature continued to work, because `App.SendNotifications` directly updates the relevant thread memberships mention counts via `ThreadStore.MaintainMembership`.

* deadcode: updateThreads in ChannelStore.IncrementMentionCount

* fix & rename ThreadStore.UpdateUnreadsByChannel

Rename `ThreadStore.UpdateUnreadsByChannel` to `ThreadStore.UpdateLastViewedByThreadIds`, making it unconditionally set the `LastViewed` for the given threads (as well as `LastUpdated`).

All previous invocations of this method that passed `updateViewedTimestamp` have been previously removed.

* unrelated gofmt -w -s changes to satisfy linter

* always set LastUpdated to model.GetMillis()

* deadcode: ThreadStore.SaveMembership

* fix TestMarkUnreadWithThreads

* GetMasterX
2022-02-28 16:24:34 -04:00
Ben Cooke
cc900149c6 [MM-42068] Add check to stop custom groups linking to teams and channels (#19633)
* tools updates

* Revert "tools updates"

This reverts commit 6293297b55803c5a263e200ebd80192899666ae9.

* stop custom groups linking to teams and channels

* updating test and changing logic

Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MacBook-Pro.local>
Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MBP.ht.home>
2022-02-28 15:06:26 -05:00
Josh Soref
5d85417a8b spelling: strings (#19542)
Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-02-28 15:01:00 +05:30
Ben Schumacher
3c48be040f Skip TestDeleteChannel (#19638) 2022-02-25 11:27:04 +01:00
Nathaniel Allred
02818bfe7c revert to status found for login cws (#19625) 2022-02-24 09:14:50 -06:00
Julien Tant
53919bd332 [MM-41671] Support Email Position+Validation (#19590) 2022-02-23 08:04:29 -07:00
mkraft
7fa6b321ae Custom groups (#18839)
* WIP

* adding initial creategroup endpoint

* fetching by group source

* fixing startup error

* updating create endpoint to take an array of user_ids, this will allow us to create the group with one request

* adding delete group endpoint and appropriate test

* adding source param for getGroups

* adding add members and delete members endpoints

* locking down crud endpoints to only be allowed for custom groups

* user search stuff

* allowing remoteid be null by changing field to pointer

* code cleanup and store level tests

* adding new tests and removing unused endpoint

* resolving conflicts

* Adds authz check for group.

* Adds authz checks to groups APIs.

* Updated create group authz tests.

* Updates delete group tests.

* Tests create group.

* Adds some tests and validations.

* adding new parameter so I can get users not in a group

* Fixed all lint warnings.

* Fix type.

* fixing search users not in group

* Fixes some lint errors.

* Moves entry in JSON array.

* Fixed SQL query.

* Fixes permission migration test.

* Fixes migration test.

* Fixes some group store tests.

* Fix test.

* Fix test.

* Revert lint change.

* Migrated CreateWithUserIds to sqlx.

* Adds tests for GetMember; migrates implementation to sqlx.

* Tests GetNonMemberUsersPage and hanles wrong group id.

* Fixes test.

* Switches GetMaster to GetMasterX.

* Switches GetReplica to GetReplicaX.

* Fixes logic.

* Fixes shadow declaration.

* Adds include_member_count to get group API endpoint.

* Adds filter_has_member param to getGroups.

* Fixes.

* Removes array of group sources.

* fixing error

* Testing reverting CreateWithUserIds back to gorp.

* Added websocket event for CreateGroupWithUserIds.

* Changed a few response status codes. Switched to correct permission.

* Added member count to ws payload for group when updating or creating.

* Adds feature flag checks for custom groups.

* Added middleware function to require license. Added config to disable custom groups.

* Change for function signature change of executePossiblyEmptyQuery.

* Lint fixes.

* Adds telemetry none comment.

* Adds translations.

* Migrated to sqlx.

* Temp. removal of translation.

* Fixed typo.

* Added an intermediary model to query with a field that is now ignored by sqlx on read queries.

* Re-used existing store struct.

* Inludes member count.

* Fix for merge error.'

* Require license for group endpoints.

* Updates translations.

* Fix shadow declaration.

* Renames permissions. Switches to new method to retrieve remoteid.

* Added WS events for upsert and delete member(s).

* Added new store error type ErrUniqueConstraint.

* Added EnableCustonGroups to the client config.

* Sanitized some user records.

* Added parameter to include_total_count for listing groups.

* Added translations.

* adding deleteAt field to getByUsers query

* Revert sanitize.

* Added uniqueness constraint error to UpdateGroup.

* Removed the FutureFeatures flag so that the feature is not enabled on old Enterprise licenses.

* Renamed function.

* Updates authz check for user search related to groups.

* Removed debug statement.

* Removed unused app method.

* Added telemetry for enable_custom_groups.

* Returns early from nil license.

* Updates test.

* Returned early to avoid nesting in (*SqlGroupStore).checkUserExist. Switched to reading from replica in (*SqlGroupStore).GetMember. Handled JSON marshal error in (*Client4).UpsertGroupMembers

* Switched to SanitizeProfile.

* Switched to model.NewInt.

* Switched from status NotImplemented to Forbidden for missing license.

* Removed deactivated users from 'exists' set.

* Revert gotool update.

* Ignored lint error that I think is invalid.

* Added the approprate access tag for disabling custom groups.

* Revert change to response status.

* Fixed refactor mistake.

* Limited the group member WS events to individual users.

* Removed WS event of deleted groups.

* Updated license check for searchUsers endpoint.

* Switched from license feature to license sku.

* Update app/group.go

Co-authored-by: Claudio Costa <cstcld91@gmail.com>

* Update app/group.go

Co-authored-by: Claudio Costa <cstcld91@gmail.com>

* Remove linter ignore comment.

* Added function to create sku-specific license.

* Fixed typo. Removed comment.

* Fixed for wrong type.

* Added missing param to client. Removed unnecessary props setting. Added test for retrieving groups by source.

* Updated some tests now that we're validating group membership not created for deactivated user.

* Fix for groups endpoint returning all group types by default.

* Changes constant names. Adds migration for all users to manage custom group members.

* Removes requirement for manage_system permission to filter user search by group.

* Added migration mock.

* Removes default permissions from custom_group_user role.

* Fixes migration.

* Fixes emoji migration test.

* fixing issue with member counts

* fixing search issue for deleted members

Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MacBook-Pro.local>
Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MBP.ht.home>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MacBook-Pro.fritz.box>
Co-authored-by: Claudio Costa <cstcld91@gmail.com>
2022-02-17 12:34:39 -05:00
Nathaniel Allred
a3c1507563 Remove wait group for onboarding complete code (#19580)
* remove wait group for onboarding complete code
2022-02-17 10:05:37 -06:00
Nathaniel Allred
459f54ac9d Use case onboarding (#19446)
* Add use case onboarding feature flag
* Add endpoints and storage for whether first admin completed setup
* Add migration for FirstAdminSetupComplete

Co-authored-by: Michael Kochell <6913320+mickmister@users.noreply.github.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
2022-02-15 17:46:03 -06:00
mkraft
627dd650d6 Revert "MM-41211: Adds ability to set SessionLengthSSOInDays to a decimal. (#19396)" (#19563)
This reverts commit 7398451030.
2022-02-15 12:50:56 -05:00
Jesús Espino
2c3e289509 Working on refactoring jobs service (#19205)
* Working on refactoring jobs service

* Making more consistent with the previous existing code

* Remove no longer needed functions

* Making a base PeridicScheduler to use it in most of the schedulers implementations

* Removing accidental complexity from on of the jobs

* Removing accidental complexity from expirynotify

* Fixing compilation from previous commit

* Remove accidental complexity from the export_delete job

* Simplifying the workers by making a reusable worker

* Using simple worker for export_delete job

* Simpliying export process job

* Simpliying extract content job

* Simpliying import delete job

* Simpliying import process job

* Simpliying product noticies job

* Simpliying fix crt channel unreads job (only removing the uneeded register function)

* Simpliying migrations job (only removing the uneeded register function)

* fixup

* Simpliying plugins job (only removing the uneeded register function)

* Simpliying bleve indexing job (only removing the uneeded register function)

* Simpliying resend invitation email job (only removing the uneeded register function)

* Fixing tests

* Simplifying migration tests infrastructure

* Adding missed license to files

* Adding an empty file to imports package to ensure this package exist even without enterprise repo

* Regenerating einterfaces mocks

* Adding missed license to files

* Updating i18n/en.json file

* help fixing enterprise tests compilation

* Adding new DailyScheduler

* Fixing typo and changing the waitTime type for periodic sechduler

* Making the daily scheduler more generic

* Adding comments to clarify not used parameters in interface scheduler interface implementations

* Using merror to handle multiple errors in jobs workers

* Fixing linter errors

* Addressing PR review comments

* Reverting go.tools.mod changes

* Removing the static check for worker type in the model (moving it to the insertion of new jobs

* Moving migrations job to the jobs directory

* Fixing (and improving a bit) tests

* Apply suggestions from code review

Co-authored-by: Doug Lauder <wiggin77@warpmail.net>

* Fixing enterprise tests

* Removing unneeded InitWorkers/InitSchedulers calls

* Fix expirenotify job when error happens

* Fixing govet errors

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Doug Lauder <wiggin77@warpmail.net>
2022-02-14 18:21:18 +01:00
mkraft
7398451030 MM-41211: Adds ability to set SessionLengthSSOInDays to a decimal. (#19396)
* MM-41211: Accepts a decimal for the SSO session length.

* MM-41211: Fixes test and logic error.

* MM-41211: Validates session length is minimum 1 hour.

* MM-41211: Tricking the CI to allow an empty string.

* Fixes a test error and some lint changes.

* Fix error.

* Reverting IDE change.

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-02-14 12:06:47 -05:00
Agniva De Sarker
3f52bd197a GraphQL (part 2): Model changes and resolvers (#19486)
This PR adds the necessary resolvers to support
the graphQL front-end. Some additional methods
need to be added to the model structs to support
this. Comments have been made to clarify their purpose.

There is a slight duplication of code in the api layer.
But eventually that's going to go away when we move
away from the REST API entirely.

The schema is in api4/schema.graphqls and gets compiled
into the binary as an asset.

The GraphiQL editor url is at GET /api/v5/graphql.

Everything is behind the feature flag MM_FEATUREFLAGS_GRAPHQL.

```release-note
NONE
```
2022-02-11 12:37:05 +05:30
Ben Cooke
88968f9e17 Growth spike guest accounts (#19437)
* tools updates

* Revert "tools updates"

This reverts commit 6293297b55803c5a263e200ebd80192899666ae9.

* new endpoint to get users that should potentially be guests

* checking authservice to ensure they were an email signup

* adding tests for new endpoint

* fixing translation issue

* permissions for new endpoint

* fixing tests

* fixing when domain array is empty

* fixing when domain array is empty

* removing bots from request

Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MacBook-Pro.local>
Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MBP.ht.home>
Co-authored-by: mkraft <martinkraft@gmail.com>
2022-02-10 15:36:14 -05:00
Kyriakos Z
457aeb8e7e MM-36589: provide previous values for unreads (#18492)
* MM-36589: provide previous values for unreads

To successfully figure out the new counts of mentions or unread replies
for CRT we need to provide previous values alongside with the new.
This is needed so we'll know how many to subtract from the total.

This commit provides those numbers upon publishing websocket ThreadUpdated
and ThreadReadChanged events.

* Fixes errors

* Removes unneeded lines

* Adds GetThreadUnreadReplyCount store method

Uses the new store method to get unread replies instead of
GetThreadForUser.

* Tests, and some changes

- Adds api4 tests to test ws events
- Uses sqlx instead of gorp for new store method
- Fixes case where previous_unread_replies could be a negative value

* Refactors tests and adds more cases

* Fixes previous and current unread counts for commenter

When a user posts a reply to a thread the unread counts had a couple of
issues.
UnreadMentions where not zeroed out, and previous unread counts where
not set correctly.

This commit tries to fix that by marking the thread as read for the
current poster after we set previous unread counts to the websocket
event data.

Also MaintainMembership should zero out UnreadMentions when we are
setting the thread as read.

* Oops

* Fixes tests by updating when maintaining membership

OK, so some tests broke because we zero UnreadMentions in the membership
when we UpdateViewedTimestamp, since the new timestamp is always now.

Some tests broke because MaintainMembership for the commenter so that
the thread is read each time commenter posts moved further down in the
SendNotification method.

BOTH those test cases are fixed with this commit. To be sincere though I
don't understand why the second one is fixed by this.

* SystemAdminUser was not part of the channel

Some tests are failing because SystemAdminUser is not part of the
team and channels.
This commit adds user to team and channels, in an effort to fix
api4/user_tests

* Fixes tests

* Fixes tests

* Addresses review comments

* Fix if clause

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-02-09 15:41:30 -05:00
Ben Schumacher
6dab9eadf8 [MM-40935] Add OnInstall() plugin hook (#19499) 2022-02-09 20:29:00 +01:00
Kirill Krotov
440790dad6 [MM-39631] mirgate user store to sqlx (#19403)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-02-09 19:56:16 +05:30
Agniva De Sarker
79d63193ac MM-41184: Remove /config/migrate API endpoint (#19418)
This was introduced to let the functionality happen
via mmctl, but it does not differentiate between
sysadmins vs people having physical access to machines.

Therefore, we remove it and only keep the local endpoint
accessible from mmctl --local.

https://mattermost.atlassian.net/browse/MM-41184

```release-note
The api/v4/config/migrate API endpoint has been removed
in favor of the mmctl --local endpoint. API clients
won't be able to access this endpoint without having
physical access to the server.
```
2022-02-03 14:38:08 +05:30
Shivashis Padhi
4ebf0df545 [MM-40582] Send unsanitized user to source on user_updated (#19444)
- feat: On user_updated event, send unsanitized user to event source and send sanitized event to other users
 - tests: Add tests for user_updated event changes

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-02-03 11:28:01 +05:30
Ben Schumacher
321b19e3db [MM-41290] Add Endpoint to complete onboarding (#19435) 2022-02-02 19:45:09 +01:00
Agniva De Sarker
a733fb840d GraphQL (part 1): Store layer (#19465)
We add the necessary store methods to use GraphQL

```release-note
NONE
```
2022-02-02 22:44:22 +05:30
Ben Cooke
e09345798e Growth spike: Get latest MM version (#19366)
* tools updates

* Revert "tools updates"

This reverts commit 6293297b55803c5a263e200ebd80192899666ae9.

* new endpoint to fetch the latest release information

* adding unit tests

* fixing tests and adding check for github response

* error translations

* fixing translations

* chaning error log

* changing cache size

* empty strings for translations

* changing size to 1

Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MacBook-Pro.local>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-02-02 09:19:47 -05:00
Ashish Bhate
ae16f51aea [MM-41351] Set ThreadAutoFollow to false by default (#19441)
Summary
ThreadAutoFollow is now false by default. Won't affect existing systems that have it set to true.

Ticket Link
https://mattermost.atlassian.net/browse/MM-41351
2022-02-01 16:21:04 +05:30
Kyriakos Z
e23a7a2311 MM-40664: fixes CRT notifications (#19328)
* MM-40664: fixes CRT notifications

Reply notification settings that take effect when CRT is off where
considered when CRT is on as well. Resulting, in some cases, in not
respecting the CRT setting for notifications.
This commit fixes that by guarding against IsCRTEnabledForUser when
checking for reply notification settings.

* Adds test cases

* Satisfies the vet

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-01-31 10:47:18 -05:00
Ibrahim Serdar Acikgoz
e03384c4d1 [MM-40712] config: Bugfix on path resolution; fail if given config does not exist (#19360)
* config: bugfix on path resolution; fail if given config does not exist

* reflect review comments

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-01-31 17:15:32 +03:00