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

2448 Коммитов

Автор SHA1 Сообщение Дата
Nathaniel Allred
a8fa3f29e9 Self-hosted in-product purchase (#21804)
* Self-hosted admins can purchase licenses in-app when `ServiceSettings,SelfHostedPurchase` is true (the default)
* Content Security Policy enables loading assets from `js.stripe.com/v3` when `ServiceSettings.SelfHostedPurchase` is true (the default).
* Add `hosted_customer` API subpath
* Add status of SelfHostedPurchase to telemetry config report.
* Support showing admins self-hosted invoices when `ServiceSettings.SelfHostedPurchase` is true (the default)

Co-authored-by: Conor Macpherson <116016004+ConorMacpherson@users.noreply.github.com>
2022-12-13 13:36:18 -06:00
Mylon Suren
68373e992b set global drafts feature flag to true (#21811)
Automatic Merge
2022-12-13 16:44:09 +02:00
emmyni
4cd205027c [MM-48091]: Remove is_paid_tier (#21850) 2022-12-13 08:57:46 -05:00
Agniva De Sarker
242d7a4466 MM-48553: Fix panic in json.MarshalerError (#21846)
Although this isn't the root cause for the panic in the sentry crash,
this is indeed a bug and will cause a crash in the exact same way.

I have looked at other possibilities and I don't see any other
way for model.ChannelMembers to panic during json marshaling.

Other sentry crashes are there for ths customer and they point
to data corruption which indicates there is something funky going on.

Nevertheless, this is a valid bug and should be fixed.

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

```release-note
NONE
```
2022-12-12 20:35:09 +05:30
Shivashis Padhi
0193bfd7de [MM-47378] Respond with bad requests for wrong query parameters 'roles' in getUsers (#21569)
* Respond with bad requests for wrong query parameters in roles

* Revert "Respond with bad requests for wrong query parameters in roles"

This reverts commit d8374d94e0b1f61ad445127010f9780475c48d1a.

* Add GetUser client function to query with channel_id and roles

* Return bad parameters error on invalid roles

* Make client function generic, lint fixes

* i18n strings addition

* Validate 'role', add stricter check for comma separated roles
2022-12-09 11:43:13 +05:30
cyrilzhang-mm
7c7acb476e [MM-45052] Mark method as deprecated (#21703) 2022-12-08 15:38:29 -05:00
Agniva De Sarker
7606fd9725 MM-48651: Log error while queuing telemetry (#21821)
We didn't use to handle the error returned from the Enqueue
method. We fix that.

Additionally, we add a verbosity flag that can allow us to
look into verbose logs from the rudder client. This can
help us to debug issues regarding telemetry not being sent.

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

```release-note
NONE
```
2022-12-08 21:25:00 +05:30
Conor Macpherson
cdc8476032 Merge branch 'master' of github.com:mattermost/mattermost-server into MM-48125-downgrade-to-starter-email-says-upgrade-with-billing-start-date 2022-12-07 10:21:55 -05:00
Nick Misasi
3872f24b0c [MM-47566] Add upcominginvoice field to Subscription type (#21717)
* Add upcominginvoice field to Subscription type

* Add support for fetching upcoming invoices

* Put back upcominginvoice

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-12-07 10:05:48 -05:00
Kyriakos Z
b51c06e5a6 Enables PostPriority FeatureFlag by default (#21720)
Automatic Merge
2022-12-07 16:44:48 +02:00
Konstantinos Pittas
6e9dbbd237 [MM-46463] Return last_picture_update for new team members (#21758)
* return last picture update

* add API test

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-12-07 11:16:56 +02:00
Shivashis Padhi
03a5b4a288 [MM-48727] Restore license checks for SSO in self-hosted deployments (#21781)
* Revert license checks for sso integrations

 - Revert license check changes for open-id connect options
 - Add option to integrate openid-connect for all cloud offerings

* Move enterprise SSO features back to enterprise repository
2022-12-06 16:47:26 -05:00
Conor Macpherson
82d9f25807 Replase product skus with their full names. 2022-12-06 13:03:00 -05:00
Michael Kochell
c3c81cb3d6 MM-48120/MM-48623 Patch plugin bundle react-dom on webapp extract (#21171)
Automatic Merge
2022-12-06 19:44:48 +02:00
Conor Macpherson
fc8268990e Add check for subscription change to product with sku cloud-starter. 2022-12-05 14:34:51 -05:00
Konstantinos Pittas
3059abdd88 [MM-44765] Add API method for getting post's information from permalink (#21518)
* add api for getting post's information

* add information about current user state

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-12-05 16:04:44 +02:00
Allan Guwatudde
966456567d MM-47420 - Add endpoint to fetch selfhosted products (#21678)
* created selfhosted endpoint

* make autogenerated mocks

* add test

* add user id

* remove user id requirement

* add tests

* send user id with request

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-11-30 14:26:30 +03:00
Julien Tant
3e928f57fb [MM-48031] Work template read API (#21661) 2022-11-29 14:53:03 -07:00
Kyriakos Z
a240cd53eb MM-48614: saves priority for drafts (#21752)
* MM-48614: saves priority for drafts

Adds a new column in the drafts table, "priority".
This way we can save post's priority in the draft.

Fixes OmitConnectionId, which when you published a ws event for a user
was getting bypassed.

Fixes Get for drafts returns deleted ones as well, which is needed for
upsert.

* Adds test case for the OmitConnectionId

* Addresses review comments, removes DeleteAt

* Vets

* Adds missing translation

* Re-instates DeleteAt column

* Adds separate case to get draft including deleted

* Fixes Update Draft

* Empty
2022-11-29 23:36:47 +02:00
Nathaniel Allred
4f3f6e6496 Mm 47422 signup token (#21662)
* When service setting flag is on, self hosted workspaces can initiate process for self-serve sign up
* Add hosted_customer api.
2022-11-29 13:32:08 -06:00
emmyni
2455de99ff [MM-47565]: In product true up for yearly products (#21704) 2022-11-29 11:47:51 -05:00
emmyni
f12ac02e0b [MM-48088]: Ability to migrate from Monthly to Cloud Pro Annual (#21673) 2022-11-28 16:54:15 -05:00
Martin Kraft
62d9218011 MM-47936: Removes CustomGroups feature flag. (#21739)
* MM-47936: Removes CustomGroups feature flag.

* MM-47936: Updates godoc.
2022-11-28 13:49:51 -05:00
Christopher Poile
ccc9e9650c MM-48070 - Remove the unused CallsMobile feature flag (#21721)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-11-25 14:45:25 -05:00
Kyriakos Z
5e5769c4ee MM-45317: global drafts endpoints and ws events (#20614)
* MM-23881: global drafts endpoints and ws events

Adds endpoints:
- create/update drafts
- delete draft
- get drafts

Adds WS events:
- draft_updated
- draft_created
- draft_deleted

* Ordering and WS event name fixes

* Adds PostID to the drafts table

In the future the drafts will include edited posts, this commit adds the
post id in the combined pkey of the table.

* Fixes route for deleting a thread draft

* Fixes failed checks

* Fixes migrations

* Fixes migration

* Extract translation strings

* Removes PostID since we won't sync editing posts

* Fixes tests

* Fixes i18n

* Update migrations for global drafts

* update branch with latest master changes

* Add feature flag for global drafts

* Set global drafts feature flag default to true

* Added support for files in drafts

* Fix failing i18n check

* Added support for deleting files in drafts

* Revert "Added support for deleting files in drafts"

This reverts commit 45dfd04a760359de2e8814d652c9ef46daf994f6.

* Triggering new test server

* Add config setting 'AllowSyncedDrafts' for syncing drafts with server

* Triggering new test server

* Triggering new test server

* Add guard for config setting and add initial tests

* Fix i18n and lint errors

* Triggering new test server

* Add tests for drafts

* fix lint issues

* Add tests for model/draft

* Triggering new test server

* Triggering new test server

* Trigger new test server

* Address PR comments

* Change left join to regular join in GetDraftsForUser

* Fix broken test

Maybe consider adding an inclDeleted field if we want to get deleted drafts in the future

* fix translations

* Add store tests for drafts

* fix test naming

* remove comment

* update migrations

* set feature flag default to false

* update migrations

Co-authored-by: Mylon Suren <mylonsuren@gmail.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-11-23 22:21:40 -05:00
Kyriakos Z
27db854089 MM-47750: Adds PostAcknowledgements table and apis (#21689)
* MM-46410: adds urgency on mention counts

We have introduced priority for posts in
https://github.com/mattermost/mattermost-webapp/pull/10951.
We do need to color the mention badges in the webapp with a prominent
color when a mention is posted in an urgent message.
A thread has urgent mentions if the root post is marked as urgent, and
the replies contain mentions to the user viewing the thread.

This PR adds two columns, urgentmentioncount, and isurgent, in
channelmembers, and threads tables respectively.
Furthermore when asking for team/thread mention counts, we also return
urgent mention counts for the user.

* Fixes method in tests

* empty commit

* Fixes method call

* Fixes single thread response is_urgent

* Fixes errors

* Fixes mysql migration and adds graphql schema

* Fixes tests

* Refactors IsUrgent and Adds PostsPriority table

Changes:
- removes is_urgent from the threads table
- adds a new table to hold posts priorities
- refactors priority out of the props and into the new table

* Fixes

* Adds translation strings

* Fixes migrations and tests

* Fixes tests

* empty

* Adds Priority to Copy

* empty

* Fixes priority not saved when boards is enabled

We are nilifying Metadata when post.ForPlugin(), which didn't save Priority
for a post when Boards was enabled.
This commit copies metadata again to the post, so metadata are
reinstated.

* Fixes tests

* Adding store tests and fixes syntax error

* Uses threads.ThreadTeamId

* Fixes error

* Adds UrgentMentionCount in graphql api test

* Fetches post priority in batches

* Addresses review comments

* Restore only priority on create post

* Fixes tests

* Nits

* Some refactoring

* Fixes get thread options when post priority enabled

* Adds missing translation

* Use the constant instead of "urgent" string

* Renames urgent constant

* MM-47750: Adds PostAcknowledgements table and apis

- Adds post acknowledgement api/app/store methods to be able to save and
delete post acknowledgements by users.
- Adds wesbsocket events for acknowledgement created/deleted
- Returns post acknowledgements in the post's metadata

* Empty

* Fixes incorrect urgent count when marking a post as unread

* Adds license

* Fixes ACK api, and adds tests

* Fixes vet

* Fixes tests

* Addresses review comments

* Remove unnecessary lines

* Adds config option and changes return of delete ack

* Empty

* Empty

* Enable config by default

* Fixes intl

* Fixes test after setting config default true

* Changes endpoints to PostForUser

* Avoids replica lag

* Fixes error in merge

* Fixes RetryLayer tests due to merge

* Empty

* Empty

* Empty

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-11-23 19:41:23 -05:00
Kyriakos Z
c44d37629a MM-46410: adds urgency on mention counts (#20999)
* MM-46410: adds urgency on mention counts

We have introduced priority for posts in
https://github.com/mattermost/mattermost-webapp/pull/10951.
We do need to color the mention badges in the webapp with a prominent
color when a mention is posted in an urgent message.
A thread has urgent mentions if the root post is marked as urgent, and
the replies contain mentions to the user viewing the thread.

This PR adds a column, urgentmentioncount, in channelmembers.
Furthermore when asking for team/thread mention counts, we also return
urgent mention counts for the user.

Adds a new table to hold posts priorities
Refactors priority out of the props and into the new table

We are nilifying Metadata when post.ForPlugin(), which didn't save Priority
for a post when Boards was enabled.
This commit copies metadata again to the post, so metadata are
reinstated.

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Vishal Choudhary <vish9812@gmail.com>
2022-11-23 21:08:21 +02:00
Javier Aguirre
7f419ea091 [MM-48542] Removing integration limits (#21282)
* Removing integration limits

* Remove freemium limit test

* Remove test assertion regarding cloud limits

* Remove GetIntegrationsUsage

* Removing integrations usage notifications

* This shouldn't be removed

* Removing client call and websocket event

* Remove old translations

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-11-23 10:42:23 +01:00
Ben Cooke
76f7872a50 [MM-46692] Channel group member count (#21270)
* tools updates

* Revert "tools updates"

This reverts commit 6293297b55803c5a263e200ebd80192899666ae9.

* adding channel member count to groups request

* fixing models

* adding a new test

* removing unused var

Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MacBook-Pro.local>
Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MBP.ht.home>
Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MBP.fritz.box>
Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MacBook-Pro.fritz.box>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-11-22 11:31:04 -05:00
Shivashis Padhi
ee40eb956c [MM-47384] Make OpenID Connect free for all (#21556)
* wip: make OpenID Connect free-for-all

* Deprecation note: GoogleOAuth, Office365OAuth

* Improve deprecation comments

Co-authored-by: Martin Kraft <martin@upspin.org>

* Lint fix

* Add model/oauthproviders, move google, openid, office365 from enterprise

* Vet fixes

* Remove redundant log

Co-authored-by: Martin Kraft <martin@upspin.org>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-11-22 11:09:04 +05:30
Martin Kraft
fcd45de73b MM-48186: Add a new API endpoint to add a user to their default GroupChannels and GroupTeams. (#21591)
* MM-48186: Add a new API endpoint to add a user to their default GroupChannels and GroupTeams.

* MM-48186: Removed unrelated lint fixes.

* MM-48186: Removed variable from previous iteration.

* MM-48186: Adds translation.

* MM-48186: Not upgrading golang.org/x/text in this pr.

* MM-48186: Validate user ID and auth service.

* MM-48186: Use user id from struct.

* MM-48186: Added basic client test.

* MM-48186: Adds empty translation.

* MM-48186: Added translations.

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-11-21 13:36:41 -05:00
Shivashis Padhi
5be8557247 [MM-44168] Add feature to restore archived user groups (#20369)
* Add undelete feature, add mocks, tests

* Rename undelete->restore

* make store-layers

* make app-layers

* Store -> Store()

* Lint fixes

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-11-17 14:53:54 +05:30
Mattermod
ab5137395c Update minor version to 7.6.0 (#21664)
Automatic Merge
2022-11-15 20:28:52 +02:00
Pablo Andrés Vélez Vidal
f07de38cc5 MM-47866 - remove deprecated inviteToTeam FF (#21600) 2022-11-10 10:59:11 +01:00
Pablo Andrés Vélez Vidal
e5828b6da0 MM-47865 - remove guided channel ff (#21599) 2022-11-09 20:06:52 +01:00
Julien Tant
da124abcb9 [MM-47843] Feature Flag for Work Template Modal (#21553) 2022-11-03 16:50:59 -07:00
Shota Gvinepadze
b8da473da7 [MM-47542] Extend Plugin API (#21446)
* Extend Plugin API

* Use Error, NoError in tests

* Address suggestions

* Simplify code

* Add new line

* Add featureflag and GetCollectionMetadataByIds hook

* Add enter at the end of file

* make build-templates

* Fix test

* Fix GetCollectionMetadataByIds ret type

* Add GetTopicMetadataByIds hook

* Add log

* Extract i18n

* Add experimental notice on hooks

* Update model/feature_flags.go

* Swap user to userId

* Change userId to userID

Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
2022-11-03 22:43:30 +04:00
Nick Misasi
a541cda9d0 Invalidate cloud caches when a new license is loaded (#21579)
Automatic Merge
2022-11-02 22:40:26 +02:00
emmyni
1ae97fc381 [MM 46537]: Feature flag for the new annual subscription toggle (#21551) 2022-11-02 12:42:01 -04:00
Muhammad Salman
776c4e52c5 [MM-47931] feature flag reduced onboarding task list should be off by default 2022-11-01 16:31:55 +02:00
Muhammad Salman
dd036a1cef [MM-47931] feature flag for reduced onboarding task list item 2022-10-31 22:25:47 +02:00
Conor Macpherson
1f1e83a16c MM-47838 - Conclude A/B test for upgrade button (#21508)
Automatic Merge
2022-10-28 01:10:25 +03:00
Said Atrahouch
effbf7d620 Merge pull request #21486 from mattermost/mm-46549-gather-intent-cloud-monthly-subscription
Mm 46549 gather intent cloud monthly subscription
2022-10-27 11:42:06 +02:00
Tim Scheuermann
6d162bc1ce Fixed job.IsValid and added tests (#21501) 2022-10-27 10:02:30 +02:00
Shota Gvinepadze
96c8dc1281 [MM-45868] Replace TeamId column with ThreadTeamId (#21505)
* Replace TeamId column with TreadTeamId

* make migrations-extract
2022-10-26 19:50:37 +04:00
cyrilzhang-mm
82096a8cbb [MM-44336] Add timestamp parameter to test data slash commands (#21400) 2022-10-26 09:08:24 -04:00
Mattermod
92efe456ee Merge branch 'master' into mm-46549-gather-intent-cloud-monthly-subscription 2022-10-26 14:11:11 +03:00
Agniva De Sarker
ee3fae80bc MM-47884: Migrate config state from focalboard plugin (#21490)
Instead of blindly setting the initial flag value
to false, we set it to the original plugin setting.

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

```release-note
NONE
```
2022-10-25 23:29:16 +05:30
Agniva De Sarker
b62ee905ae MM-40690: Populate the error message with email address (#21491)
When logging via openID, if the user email is invalid,
we don't log the invalid email address. This makes
debugging difficult.

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

```release-note
NONE
```
2022-10-25 14:58:13 +05:30
emmyni
679c23d235 [MM-47560]: In-product: Add support for new fields (back-end and front-end) 2022-10-24 13:34:38 -04:00