Agniva De Sarker
c72e9131f4
MM-46577: Remove empty translation strings ( #20876 )
...
We replace the empty translation key with <untranslated>
which is ignored by the translation check tool.
https://mattermost.atlassian.net/browse/MM-46577
```release-note
NONE
```
2022-08-25 19:59:16 +05:30
Shivashis Padhi
e3efc46f69
[MM-43444] Delete profile image and invalidate cache on permanent user deletion ( #20033 )
...
* Delete profile image and invalidate cache on permanent user deletion
* Modify request to send 202 with error information on failing to delete profile image
2022-08-25 11:30:50 +05:30
Ibrahim Serdar Acikgoz
f0e4794cda
Move config store into Platform Service ( #20718 )
...
* update config methods
2022-08-08 16:52:31 +03:00
Agniva De Sarker
d4b710b3ab
MM-45194: Switch app/user and api4/user to logger context ( #20674 )
...
```release-note
NONE
```
Co-authored-by: Mattermod <mattermod@users.noreply.github.com >
2022-07-28 10:04:21 +05:30
Tim Scheuermann
6dc897b04f
MM-45193 Use context for channel logging ( #20575 )
2022-07-14 11:01:29 +02:00
Martin Kraft
b99bd0d049
MM-45204: Enables Insights feature flag by default. ( #20509 )
...
* MM-45204: Enables Insights feature flag by default.
* MM-45204: Update test.
2022-07-05 09:16:44 -04:00
Allan Guwatudde
dad8eab777
[MM-45159] - Flaky test: TestCreateUserWithInitialPreferences ( #20557 )
...
* [MM-45159] - Flaky test: TestCreateUserWithInitialPreferences
* fix assertion order
2022-06-30 09:23:31 +03:00
Agniva De Sarker
076454b4f3
MM-45159: Skip flaky TestCreateUserWithInitialPreferences ( #20489 )
...
https://mattermost.atlassian.net/browse/MM-45159
```release-note
NONE
```
Co-authored-by: Mattermod <mattermod@users.noreply.github.com >
2022-06-20 21:33:28 +05:30
Ben Cooke
2c63e8dd08
[MM-43785] Hide insights feature intro for new users ( #20214 )
...
* tools updates
* Revert "tools updates"
This reverts commit 6293297b55803c5a263e200ebd80192899666ae9.
* hide insights modal by default for new users
* updating feature flag for test
* updating preference tests
* fixing lint
* fixing comment
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 >
2022-06-08 14:56:34 -04:00
Mylon Suren
77ec4aa404
[MM-41041] Remove requirement for create_at in UpdateUser ( #19597 )
2022-04-06 14:42:52 -04:00
Ibrahim Serdar Acikgoz
1c49366f00
app/user: ensure that user gets sanitized while calling plugin hooks ( #19808 )
2022-03-25 12:39:11 +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
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
Agniva De Sarker
678c7d3b8c
Replace remaining GetMaster() queries ( #19545 )
...
There are still some remaining which
access the raw DB struct. There will be
a separate PR to clean those up.
```release-note
NONE
```
2022-02-16 22:30:27 +05:30
Julien Tant
d2cabaebab
[MM-41343] Password reset must be 24hour ( #19484 )
2022-02-05 13:52:34 -07:00
Josh Soref
294bd44971
[GH-19267] Spelling comments ( #19268 )
...
* spelling: comments
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
Co-authored-by: Josh Soref <jsoref@users.noreply.github.com >
Co-authored-by: Mattermod <mattermod@users.noreply.github.com >
2022-01-20 10:07:27 +05:30
Anurag Shivarathri
65c670a4c9
MM-36687 CRT push notifications ( #18347 )
...
* CRT changes
* Lint fix
* Moved postId check
* Moved postId check
* Lint fix
* Misc
* Added test case for badge count while clearing notifications
* Fixed count when CRT is on and added isCRTEnabled, teamId to isIdLoaded notifications
* test fix
* isCRTEnabledForUser capitalised
Co-authored-by: Mattermod <mattermod@users.noreply.github.com >
2021-11-15 10:41:47 +05:30
Agniva De Sarker
fdf1afadf3
Fix Flaky test UpdateUserEmail ( #18750 )
...
Since the email sending would run in a separate goroutine,
it was possible that during the second th.App.UpdateUser call
the goroutine would run much later.
So the secondToken would be the same as the firstToken,
and the test would fail.
The fix is to ensure that the token received is different
from the firstToken.
https://community-daily.mattermost.com/boards/workspace/zyoahc9uapdn3xdptac6jb69ic/285b80a3-257d-41f6-8cf4-ed80ca9d92e5/495cdb4d-c13a-4992-8eb9-80cfee2819a4?c=254a9782-a59b-4d38-8886-4927f593e715
```release-note
NONE
```
2021-10-19 19:17:08 +05:30
Allan Guwatudde
609fea0002
[MM-39205] Check that emails match during sign-up ( #18635 )
2021-10-18 09:34:10 +03:00
Agniva De Sarker
f0ecdcc5f5
Move Channels into App ( #18623 )
...
* Move Channels into App
In this PR, we make Channels as part of App
instead of Server. This is part of the transition period
of moving fields from Server to Channels.
For now, Channels contains Server. So the hierarchy is
App -> Channels -> Server.
And as a first step, we also move httpService to Channels.
```release-note
NONE
```
* Fixing another test
```release-note
NONE
```
* new method
```release-note
NONE
```
2021-10-12 11:39:49 +05:30
Claudio Costa
92837fa1ee
[MM-22051] Remove To/From JSON ( #18070 )
...
* Posts
* Add missing translation
* Fix internal store marshaling
* [MM-22051] Remove To/From JSON (Channels) (#18116 )
* Channels
* Channel members
* ChannelSearch
* Channel categories, list, sidebar, stats, view
* Fix conversions
* [MM-22051] Remove To/From JSON (Users) (#18121 )
* User related structs
* Fix return
* Team related structures (#18127 )
* [MM-22051] Remove To/From JSON (Status, Bot, Reaction, Thread, FileInfo) (#18130 )
* Status
* Bot
* Reaction
* Thread
* FileInfo
* Some fixes
* Translations update from Weblate (#18143 )
* Translated using Weblate (German)
Currently translated at 100.0% (2309 of 2309 strings)
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/
* Translated using Weblate (Turkish)
Currently translated at 100.0% (2309 of 2309 strings)
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/
* Translated using Weblate (Hungarian)
Currently translated at 100.0% (2309 of 2309 strings)
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/
* Update translation files
Updated by "Cleanup translation files" hook in Weblate.
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/
Update translation files
Updated by "Cleanup translation files" hook in Weblate.
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/
Update translation files
Updated by "Cleanup translation files" hook in Weblate.
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/
Update translation files
Updated by "Cleanup translation files" hook in Weblate.
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/
* Translated using Weblate (German)
Currently translated at 100.0% (2301 of 2301 strings)
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/
* Translated using Weblate (Turkish)
Currently translated at 100.0% (2301 of 2301 strings)
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/
* Translated using Weblate (Hungarian)
Currently translated at 100.0% (2301 of 2301 strings)
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/
* Translated using Weblate (English (Australia))
Currently translated at 100.0% (2301 of 2301 strings)
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/en_AU/
* Translated using Weblate (Bulgarian)
Currently translated at 100.0% (2301 of 2301 strings)
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/bg/
* Translated using Weblate (Japanese)
Currently translated at 100.0% (2301 of 2301 strings)
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/ja/
* Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (2301 of 2301 strings)
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/zh_Hans/
Co-authored-by: JtheBAB <srast@bioc.uzh.ch >
Co-authored-by: Kaya Zeren <kayazeren@gmail.com >
Co-authored-by: Tóth Csaba // Online ERP Hungary Kft <csaba.toth@online-erp.hu >
Co-authored-by: Matthew Williams <Matthew.Williams@outlook.com.au >
Co-authored-by: Nikolai Zahariev <nikolaiz@yahoo.com >
Co-authored-by: kaakaa <stooner.hoe@gmail.com >
Co-authored-by: aeomin <lin@aeomin.net >
Co-authored-by: Weblate (bot) <hosted@weblate.org >
Co-authored-by: JtheBAB <srast@bioc.uzh.ch >
Co-authored-by: Kaya Zeren <kayazeren@gmail.com >
Co-authored-by: Tóth Csaba // Online ERP Hungary Kft <csaba.toth@online-erp.hu >
Co-authored-by: Matthew Williams <Matthew.Williams@outlook.com.au >
Co-authored-by: Nikolai Zahariev <nikolaiz@yahoo.com >
Co-authored-by: kaakaa <stooner.hoe@gmail.com >
Co-authored-by: aeomin <lin@aeomin.net >
* [MM-22051] Remove To/From JSON methods from model (#18138 )
* Scheme
* Role
* Session
* Config
* Status
* Fix logic
* Emoji
* GuestsInvite
* Group
* Command
* ClusterInfo
* License
* Job
* System
* Plugin
* Command2
* IncomingWebhook
* OutgoingWebhook
* Fix tests
* Update traslation
* Some fixes
* Add missing return
* Simplify
* Make Config.ToJSONFiltered() return []byte
* Make Busy.ToJSON() return []byte
* Include error in log
* Split logic
* [MM-22051] Remove To/From JSON (final) (#18150 )
* SwitchRequest
* PluginEventData
* Permalink
* PushNotification
* SuggestCommand
* PluginsResponse
* WebSocketMessage
* RemoteCluster
* SharedChannel
* PluginStatuses
* InitialLoad
* ClusterDiscovery
* ClusterStats
* MfaSecret
* GroupSyncable
* SAML
* WebSocketRequest
* TypingRequest
* SecurityBulletin
* OAuthApp
* IntegrationAction
* DataRetention
* Preference
* FileInfoList
* Compliance
* Preferences
* FileInfoSearchResults
* TermsOfService
* InstallMarketplacePluginRequest
* GitLabUser
* UploadSessions
* Remove unused helpers
* Fix tests
* [MM-23280] Fix linting for ToJSON/FromJSON (#18153 )
* SwitchRequest
* PluginEventData
* Permalink
* PushNotification
* SuggestCommand
* PluginsResponse
* WebSocketMessage
* RemoteCluster
* SharedChannel
* PluginStatuses
* InitialLoad
* ClusterDiscovery
* ClusterStats
* MfaSecret
* GroupSyncable
* SAML
* WebSocketRequest
* TypingRequest
* SecurityBulletin
* OAuthApp
* IntegrationAction
* DataRetention
* Preference
* FileInfoList
* Compliance
* Preferences
* FileInfoSearchResults
* TermsOfService
* InstallMarketplacePluginRequest
* GitLabUser
* UploadSessions
* Remove unused helpers
* Fix tests
* Fix linting for ToJSON/FromJSON
* Fix conversions
Co-authored-by: Weblate (bot) <hosted@weblate.org >
Co-authored-by: JtheBAB <srast@bioc.uzh.ch >
Co-authored-by: Kaya Zeren <kayazeren@gmail.com >
Co-authored-by: Tóth Csaba // Online ERP Hungary Kft <csaba.toth@online-erp.hu >
Co-authored-by: Matthew Williams <Matthew.Williams@outlook.com.au >
Co-authored-by: Nikolai Zahariev <nikolaiz@yahoo.com >
Co-authored-by: kaakaa <stooner.hoe@gmail.com >
Co-authored-by: aeomin <lin@aeomin.net >
Co-authored-by: Mattermod <mattermod@users.noreply.github.com >
2021-09-01 14:43:12 +02:00
Ibrahim Serdar Acikgoz
b66fd1f89e
move users service to app directory ( #18257 )
2021-08-24 10:10:40 +03:00
Claudio Costa
04b27ce93c
[MM-28985] Remove pointers to slice (part 1) ( #18034 )
...
* Remove pointers to slice (part 1)
* Remove use of pointers to slice from model package (#18045 )
* Fix after merge
2021-08-17 11:18:33 +02:00
Martin Kraft
21639f9c87
MM-22845: Added support for permalink previews. ( #17796 )
...
* MM-22845: Added support for permalink previews.
* MM-22845: Adds license to new file.
* MM-22845: Adds endpoint to retrieve multiple posts by id.
* MM-22845: Fix for deleted post.
* MM-22845: Adds config setting for permalink previews.
* MM-22845: Adds API test for new endpoint.
* MM-22845: Fix typo.
* MM-22845: Tests that post create or updated via App get the previewed_post prop.
* MM-22845: Tests for matching permalinks.
* MM-22845: Adds PreparePostForClient test for permalink previews.
* MM-22845: Embeds entire post in permalink metadata.
* MM-22845: Filter WS message payload of created and edited post based on permissions.
* MM-22845: Runs app layer generator.
* MM-22845: Lint check fix.
* MM-22845: Adds feature flag.
* MM-22845: Clones WS message.
* MM-22845: Removes knowledge of permalink from LinkMetadata table. Removes knowledge of user id from post embedding methods in favour of a 'sanitize' method/step.
* MM-22845: Handle nil post metadata.
* MM-22845: Switch to cloning post.
* MM-22845: Removes unused code.
* MM-22845: Refactor.
* MM-22845: Reverts whitespace change.
* MM-22845: Removes unnecessary code.
* MM-22845: Removes unnecessary function.
* MM-22845: Warn but don't error if permalinked referenced post or channel is not found.
* MM-22845: Fix for clone method.
* MM-22845: Fix for clone method.
* MM-22845: Updates translations.
Co-authored-by: Mattermod <mattermod@users.noreply.github.com >
2021-08-09 11:33:21 -04:00
Agniva De Sarker
e49f385598
MM-37576: Fix reference to incorrect error variable ( #18066 )
...
We use the correct error variable returned from
the store method prior to it.
https://mattermost.atlassian.net/browse/MM-37576
```release-note
NONE
```
2021-08-05 19:46:31 +05:30
Allan Guwatudde
e252608068
[MM-37064] - Onboarding flow is showing for existing users ( #17977 )
...
* [MM-37064] - Onboarding flow is showing for existing users
* add tests
* fix typo
* fix lint
* fix tests
2021-07-23 19:54:51 +03:00
Agniva De Sarker
c4b4e1bc38
MM-36271: Bump major version to 6.0 ( #17973 )
...
https://mattermost.atlassian.net/browse/MM-36271
```release-note
We bump the major version to 6.0
```
2021-07-22 12:21:47 +05:30
Ben Schumacher
97ccf0bdf6
[MM-16751] golint model ( #17896 )
2021-07-21 16:38:39 +02:00
Ibrahim Serdar Acikgoz
41dc05a6bd
Decouple emailservice from app package ( #17827 )
...
* decouple emailservice from app package
* fix some escaped errors
* move email package under app directory
* fix i18n
* reflect review comments
2021-07-19 23:26:06 +08:00
Miguel de la Cruz
5b99df7bcd
[MM-33395] Invalidate email tokens ( #17069 )
...
* [MM-33395] Invalidate existing verify email tokens when creating a new one
* Update store layers
* Addressing review comments
* Fix linter
Co-authored-by: Mattermod <mattermod@users.noreply.github.com >
2021-07-09 14:31:34 +02:00
Joram Wilander
f1913115b6
Follow threads without memberships if marked as unread ( #17800 )
2021-06-21 09:47:17 -04:00
Ibrahim Serdar Acikgoz
f69b28610a
user service: add oauth and profile images ( #17784 )
...
* users: add cache to service
* reflect review comments
* add oauth
* move profile picture genaration
* reflect review comments
* move default bot image to users package
* add missing wraps and apply suggestions
* add comment for app.GetSession
2021-06-18 19:25:03 +03:00
Ibrahim Serdar Acikgoz
24fb0033f4
users service: add sessions ( #17744 )
...
* users: add cache to service
* reflect review comments
2021-06-14 18:08:00 +03:00
Ibrahim Serdar Acikgoz
ac3bb2e811
user service: initial implementation ( #17668 )
...
* conceptual user service: initial commit
* reflect review comments
* fix i18n issues and some tests
* implement get user methods
* add license
* reflect review comments
2021-06-01 14:52:55 +03:00
Scott Bishel
2f33b52d8a
check authdata for different format ( #17577 )
...
* check authdata for different format
* add mocks, fix lint
* rename function
* update auth-data with new format
* update assert
Co-authored-by: Mattermod <mattermod@users.noreply.github.com >
2021-05-24 09:04:20 -06:00
Ibrahim Serdar Acikgoz
5ea06e51d0
Migrate to stateless app.App ( #17542 )
...
* add request context
* move initialialization to server
* use app interface instead of global app functions
* remove app context from webconn
* cleanup
* remove duplicated services
* move context to separate package
* remove finalize init method and move content to NewServer function
* restart workers and schedulers after adding license for tests
* reflect review comments
Co-authored-by: Mattermod <mattermod@users.noreply.github.com >
2021-05-11 13:00:44 +03:00
Ibrahim Serdar Acikgoz
28ff4dc8d0
[MM-32281] SqlRoleStore/GetByName: add context to allow read from master ( #17176 )
...
* role_store/GetByName: add context
* propagate context in the app layer
* propagate context in the app layer
* add missing import
Co-authored-by: Mattermod <mattermod@users.noreply.github.com >
2021-04-21 18:01:02 +03:00
Ibrahim Serdar Acikgoz
3a13987ee1
[MM-34725] app/user: check if username or email is in use before patching a user ( #17392 )
...
* app/user: check if username or email is in use before patching a user
* reflect review comments
* fix tests
2021-04-16 23:41:32 +08:00
Jesús Espino
35d00b4644
Enable the errorAssertions govet check for mattermost-server code ( #17346 )
...
* Enable the errorAssertions govet check for mattermost-server code
* Removing unnecesary change
* Fixing some tests
* Fixing tests
* Fixing more after merge
* Fixing new offending entries
* Fixing small vet checks
* Fixing new cases detected by govet
* Fixing remote_cluster_test errors
* Fixing assertion
Co-authored-by: Mattermod <mattermod@users.noreply.github.com >
2021-04-12 12:51:31 +02:00
Agniva De Sarker
db01f2a91b
MM-34002: Improve AddUserToChannel ( #17174 )
...
* MM-34002: Improve AddUserToChannel
When we would add a user to a channel, we would
check whether the user is removed from that team or not.
During LDAP sync, this check is not required because the
team member would have just been created. Hence, we
pass a boolean flag to bypass the check.
And with that done, we can freely query the replica.
https://mattermost.atlassian.net/browse/MM-34002
```release-note
NONE
```
* Refactor code
* Rename a struct field
* fix double negative
2021-04-02 14:33:23 +05:30
Claudio Costa
ee3f986da0
[MM-32622] Remove app.WaitForChannelMembership() ( #17048 )
...
* Remove app.WaitForChannelMembership
* Fix tests
* Fix test
Co-authored-by: Mattermod <mattermod@users.noreply.github.com >
2021-03-31 09:40:35 +02:00
Max Erenberg
0aa6499a48
MM-29607 allow user to deactivate MFA even when disabled ( #16994 )
...
Automatic Merge
2021-03-22 19:32:19 +01:00
Anurag Shivarathri
145fa97069
MM-31054 demote user ( #16990 )
...
* changing SchemeAdmin to false on demotion
* Added test
Co-authored-by: Mattermod <mattermod@users.noreply.github.com >
2021-03-15 18:33:54 +05:30
Jesús Espino
69ff686667
Replacing require.nil in app layer ( #16905 )
...
* Replacing require.nil in app layer
* Fixing some tests
* Fixing tests
* Reverting the error correction, defering it for another PR
* Fixing golangci-lint errors
Co-authored-by: Mattermod <mattermod@users.noreply.github.com >
2021-02-16 12:00:01 +01:00
Agniva De Sarker
d8b94836cf
MM-32471: Use created user to update roles ( #16895 )
...
During user creation via CLI, we would create the user,
but pass the user ID instead when updating the roles.
This falls into the category of read-after-write within a single request.
We fix this by passing the already created user and
directly update the roles.
https://mattermost.atlassian.net/browse/MM-32471
```release-note
NONE
```
2021-02-10 23:41:34 +05:30
SimonSimonB
ffebfbf56f
Fix initialisms/app ( #16818 )
...
Automatic Merge
2021-02-05 11:22:27 +01:00
Agniva De Sarker
c1dd23a3c8
MM-31063: Change constants to use CamelCase ( #16608 )
...
* MM-31063: Change constants to use CamelCase
* store package
* change allcaps to camel case (#16615 )
* New tools.mod
Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com >
2021-01-04 11:32:29 +05:30
Scott Bishel
f548ecbee1
MM-27688-OpenId Connect ( #16222 )
...
* implement openid connect
* update error strings
* handle OpenIdSetting.Secret as FAKE SETTING
* add openid to telemetry
* update config defaults, add telemetry
* fix bug with Office365
* Retrieve Office365 AuthData from IdToken
* fix linter
* add feature flag, reset defaults for config
* fix build error
* fix unit tests
* add authentication permission to Feature
Flags
* turn off feature flag
* set default button color
* set default button color only on openid
* fix for merging FeatureFlags in config
* remove feature flag
* revert config changes
* remove debug statements
Co-authored-by: Mattermod <mattermod@users.noreply.github.com >
2020-12-08 19:58:37 -07:00
Jesús Espino
a74fe05695
Removing supplier concept from the sql store ( #16355 )
...
* Removing supplier concept from the sql store
* Removing other metions to supplier
* Fixing gofmt
* Fixing gofmt
* Renaming NewSqlStore to New
* Fixing tests
Co-authored-by: Mattermod <mattermod@users.noreply.github.com >
2020-12-02 12:06:23 +01:00
Ibrahim Serdar Acikgoz
50e29cb47a
app/user: fix update user error when an e-mail address already in use ( #16269 )
...
Co-authored-by: Mattermod <mattermod@users.noreply.github.com >
2020-11-18 12:31:57 +03:00