Harrison Healey
704741ce3b
Merge branch 'master' into mark-as-unread
2019-08-22 09:43:56 -04:00
Gervasio Marchand
11b0a20d7d
MM-16821 - Add a KVCompareAndDelete to the plugin API ( #11804 )
...
* Implement KVCompareAndDelete and KVCompareAndDeleteJSON
* Add tests for KVCompareAndDelete
* Update minimum server version
* Handle nil value on CompareAndSet so that it deletes it
* Fix comments
* Tweaks from PR comments
* Go back to deleted, err
2019-08-21 23:25:38 -03:00
Jesús Espino
f8ad9f3b8f
Initial cache migration to new layers system ( #11878 )
...
* Initial cache migration to new layers system
* Fixing wrong change
* Remove unneeded constants
* Remove unneeded file
* Adding license headers
2019-08-21 20:23:06 +02:00
Guillermo Vayá
6b0f4f1aee
[MM-17069] Api endpoint to unread a channel ( #11794 )
...
* [MM-17069] endpoint to unread a channel from post
* [MM-17069] update mock
* [MM-17069] first passing test
* [MM-17069] fix SQL typo
* [MM-17069] fix msgCount
* add tests
* [MM-17069] Fix tests
* [MM-16069] Remove trash, add comments
* [MM-16069] Add message to errors
* [MM-17069] fix go fmt
* [MM-17069] return an UnreadChannel response
* [MM-17069] added unauthorized test
* [MM-17069] fix operator
* [MM-17069] refactor tests
* [MM-16069] back to green tests
* [MM-17069] change url to include user
* [MM-17069] Fixing code review comments
* [MM-17069] One shouldn't fix manually what a machine can fix better
* [MM-17069] change response type, update tests
* [MM-17069] fix permission error
* [MM-17069] Add tests for edit_other_users permission
* [MM-17069] no magic numbers
2019-08-21 08:48:25 -04:00
Jesús Espino
83197ec5ff
Fixing websockets updates for promote/demote ( #11799 )
...
* Fixing websockets updates for promote/demote
* Adding extra test check
* Addressing PR comments
2019-08-16 08:39:34 +02:00
Eli Yukelzon
da768d677e
MM-16888 - Fix canonical vs. migration mismatches ( #11825 )
...
* fixed migration errors, added check to Jenkins
2019-08-14 14:58:01 +03:00
Miguel de la Cruz
04d43b072c
[MM-17758] Explicits the search configuration when using full text search in postgres ( #11870 )
2019-08-13 15:48:06 +02:00
Jesse Hallam
9bb36614a6
MM-17438: allow attaching nouser files to posts ( #11837 )
...
* tweak AttachToPost formatting
* test attaching files uploaded by nouser
* MM-17438: allow attaching nouser files to posts
2019-08-12 18:35:46 -03:00
Siyuan Liu
e4bb8cd887
MM-11359: support excluding results from search ( #11196 )
2019-08-12 14:03:42 +02:00
Martin Kraft
58880a9694
MM-17432: Removes deactivated users from the group member counts. ( #11829 )
...
* MM-17432: Removes deactivated users from the group member counts.
* MM-17432: Reuses variable.
2019-08-09 14:39:57 -04:00
Jesús Espino
4acb139870
Enabling the release-5.14 migration and adding the 5.15 and 5.16 skel ( #11783 )
2019-08-06 11:54:01 +02:00
Jesús Espino
2df3951f6f
Create direct message respect the user role (Guest/Normal user) ( #11697 )
...
* Create direct message respect the user role (Guest/Normal user)
* Fixing build
* Updating Timer store layer
2019-08-06 11:33:32 +02:00
Jesús Espino
0ec0616d89
Restricting team stats using the VIEW_MEMBERS restrictions ( #11694 )
...
* Restricting team stats using the VIEW_MEMBERS restrictions
* Adding tests
* fixing tests
2019-07-31 18:34:03 +02:00
Martin Kraft
ddc48c3ac1
MM-17383: Update query to include users who are not members of any gr… ( #11730 )
...
* MM-17383: Update query to include users who are not members of any groups.
* MM-17383: Fixes govet complaint.
* MM-17383: Sorts by username.
* MM-17383: Removes accidental staging.
2019-07-30 12:04:08 -04:00
Jesús Espino
bce11b7949
Removing unnused store methods ( #11725 )
2019-07-30 09:35:28 +02:00
Maria A Nunez
3187907b67
MM-16990 - Fix webhooks visible to users without viewing permissions ( #11698 )
...
* Filtered incoming webhooks for users wihtout PERMISSION_MANAGE_OTHERS_INCOMING_WEBHOOKS
* Filtered outgoing webhooks for users without PERMISSION_MANAGE_OTHERS_OUTGOING_WEBHOOKS
* Refactored GetOutgoingByTeamByUser to its own method in app and store
* Fixed paging condition for outgoing webhooks in store
* Separated test cases into separate t.run in WebhookStore
* Improved unit test. PR Feedback
* Filtered outgoing webhooks by channel for users without PERMISSION_MANAGE_OTHERS
* Filtered getting full list of outgoing webhooks for users without PERMISSION_MANAGE_OTHERS
* Added missing signature for GetOutgoingWebhooksPage in app
* Expanded permissions in test to SYSTEM_USER_ROLE
* Filtered getting full list of incoming webhooks for users without PERMISSION_MANAGE_OTHERS
* Removed unnecessary sq.and operator
2019-07-29 12:32:26 -04:00
Jesús Espino
e067272e16
Cleaning the store from functions returning StoreResult ( #11602 )
...
* Cleaning the store from functions returning StoreResult
* Removing unnecesary StoreChannel type
2019-07-29 12:38:46 +02:00
Taufiq Rahman
c362f0e802
[MM-16174] Migrate Team.SaveMember to Sync by default #11125 ( #11354 )
...
* Migrate Team.SaveMember to Sync by default #11125
* Update migrate Team.SaveMember to Sync by default #11125
* Update migrate Team.SaveMember to Sync by default #11125
* fix shadow var #11125
* fix shadow vars #11125
* fix shadow vars #11125
* fix shadow vars #11125
* run gofmt
* Fixing tests
* Fix undefined var res
* Fixing shadow variable
* fixing tests
* Addressing PR comments
* Fixing build
* Fixing compilation after merge
* Addressing PR comments
2019-07-29 11:30:16 +02:00
Jesús Espino
a9fc3581ff
Removing unnecesary StoreResult usages to simplify the store code ( #11519 )
...
* Removing unnecesary StoreResult usages to simplify the store code
* Fixing tests
2019-07-29 10:37:35 +02:00
Miguel de la Cruz
8858b15e7e
[MM-17194] Add search channels for user in case the user doesn't have the list channels permission ( #11706 )
...
* [MM-17194] Add search channels for user in case the user doesn't have the list channels permission
* Add tests for the API layer and control the case of a user not being a team member
* Remove unnecessary empty line
2019-07-29 09:35:32 +02:00
Jesús Espino
0a12fef33a
Fix pagination bug on LDAP groups users listing ( #11711 )
...
* Fix pagination bug on LDAP groups users listing
* Fixing consistency in parameters names
2019-07-26 15:18:37 +02:00
Taufiq Rahman
7e092886dc
[MM-16658] Migrate User.GetProfilesInChannel to Sync by default #11462 ( #11685 )
...
* Migrate User.GetProfilesInChannel to Sync by default #11462
* Refactor variable names #11462
2019-07-26 13:11:13 +02:00
Jesús Espino
447589a06e
More robust guest members for users and tests for it ( #11700 )
...
* More robust guest members for users and tests for it
* Fixing shadow variables
* Fixing shadow variables
2019-07-26 10:34:01 +02:00
Gabe Jackson
b73b6b4c36
Improve bulk export of posts ( #11702 )
...
This change modifies some of the logic for processing posts during
bulk export in order to improve performance.
2019-07-25 12:20:49 -04:00
Jesús Espino
27976a6060
Fixing initial DMs/GMs load ( #11691 )
...
* Fixing initial DMs/GMs load
* Fixing ci
2019-07-23 20:29:25 +02:00
Jesús Espino
fe8a0f6485
Guest accounts feature ( #11428 )
...
* MM-14139: Creating permissions for invite/promote/demote guests (#10778 )
* MM-14139: Creating permissions for invite/promote/demote guests
* Fixing tests
* Adding invite guest api endpoint (#10792 )
* Adding invite guest api endpoint
* Adding i18n
* Adding some tests
* WIP
* Migrating Token.Extra info to bigger size (2048)
* Fixing tests
* Adding client function for invite guests
* Adding send guests invites tests
* Renaming file from guest to guest_invite
* Adding Promote/Demote users from/to guest endpoints (#10791 )
* Adding Promote/Demote users from/to guest endpoints
* Adding i18n translations
* Adding the client functions
* Using getQueryBuilder function
* Addressing PR review comments
* Adding default channels to users on promte from guest (#10851 )
* Adding default channels to users on promte from guest
* Addressing PR review comments
* Fixing merge problems
* Sending websockets events on promote/demote (#11403 )
* Sending websockets events on promote/demote
* Fixing merge problems
* Fixing govet shadowing problem
* Fixing feature branch tests
* Avoiding leaking users data through websockets for guest accounts (#11489 )
* Avoiding leaking users data through websockets for guest accounts
* Adding tests and fixing code error
* Fixing i18n
* Allow to enable/disable guests and other extra config settings (#11481 )
* Allow to enable/disable guests and other extra config settings
* Fixing tests and moving license and config validation to api level
* Update api4/role_test.go
Co-Authored-By: George Goldberg <george@gberg.me >
* Update api4/role_test.go
Co-Authored-By: George Goldberg <george@gberg.me >
* Fixing typo
* fixing tests
* Managing correctly the guest channel leave behavior (#11578 )
* MM-15134: Removing guests from teams or system on leave channels if needed
* WIP
* No deactivating the guest user when leave the last team
* Adding a couple of tests
* Fixing shadow variables
* Fixing tests
* fixing tests
* fixing shadow variables
* Adding guest counts for channel stats (#11646 )
* Adding guest counts for channel stats
* Adding tests
* Fixing tests
* Fixing guest domain restrictions (#11660 )
* Adding needed migration for the database
* Fixing migration
2019-07-22 22:13:39 +02:00
jfrerich
fdde7c8287
[MM-16871] Remove bots from "Daily Active Users" and "Monthly… ( #11658 )
...
* Add model.UserCountOptions to analyticsActiveCount method
Add new test for analyticsActiveCount method
* Add ability to delete entries from status store, by calling SQl
directly. There is no method available to delete entries from the
status store interace
* Instead of cleaning up after a test by passing userIds, just delete all
records in the status table and start fresh
* Remove Comment
2019-07-19 13:30:59 -05:00
Taufiq Rahman
4b71ee6fe3
Migrate User.GetProfilesInChannelByStatus to Sync by default #11461 ( #11623 )
...
* Migrate User.GetProfilesInChannelByStatus to Sync by default #11461
* Refactor review changes #11461
* Refactor review changes #11461
* Refactor review changes #11461
2019-07-19 09:36:00 +02:00
Gabe Jackson
20f03f7656
Improve DB performance on getPostsAround() ( #11662 )
...
This change modifies the database query used by the getPostsAround()
method in order to improve the performance of loading posts when
scrolling through a channel.
2019-07-18 12:16:45 -04:00
Max Vovshin
5f61047d02
[16331] Migrated Channel.SaveMember to sync by default ( #11158 ) ( #11624 )
...
* Added - golang version validation.
* Updated error message to include the minor version that is supported.
* Fixed issue with variable.
* Renamed variable.
* Added - golang version validation.
Added validation for major and minor versions of go.
* Fixed the way the validation is performed.
* Changed function declaration (define validate_go_version) to a target (validate_go_version).
* remove unneeded call to validate_go_version
* [16331] Migrated Channel.SaveMember to sync by default (#10613 )
* Used require.Nil to check for err variable instaed of using panic with if statement.
* Used require.Nil to check for err variable instaed of using panic with if statement in user_store
* fixed errors about shadowing with err variable.
* Fixed issue with vet tool validation.
* Fixed go fmt tool validation.
2019-07-18 16:26:22 +02:00
Tim Scheuermann
7070b3596b
Use a strings.Builder to create the idQuery string ( #11600 )
...
* Use a strings.Builder to create the idQuery string
* Use the query builder
2019-07-17 12:10:53 +01:00
krjn
dd30488a09
[MM-16389] Add icon_emoji parameter to webhooks ( #11586 )
...
[MM-16389] Add icon_emoji field to posts from incoming webhooks
To be used to substitute the profile picture on posts.
2019-07-17 11:01:18 +02:00
Tim Scheuermann
1da858ac4c
MM-16780 Migrate "Team.AnalyticsGetTeamCountForScheme" to Sync by default ( #11588 )
...
* Changed the implementation of AnalyticsGetTeamCountForScheme to sync
* Updated the Store interface
* Updated the AnalyticsGetTeamCountForScheme tests
* Updated the autogenerated mocks
* Updated trackPermissions to use the modified method
2019-07-17 01:10:30 +02:00
Phillip Ahereza
1cb32b2331
[MM-16791] Migrate Plugin.Delete to Sync by default ( #11580 )
...
* Migrate Plugin.Delete to Sync by default
* remove unused import
2019-07-16 09:10:17 -04:00
Harrison Healey
767a506889
MM-16921 Fix getPostsSince caching invalid data ( #11618 )
...
* MM-16921 Fix getPostsSince caching invalid data
* Remove workaround for invalid caching
2019-07-15 11:26:21 -04:00
Miguel de la Cruz
8f4e03a52b
[MM-15925] Add includeDeleted flag to GetForPost in FileInfoStore ( #11585 )
2019-07-15 08:54:30 +02:00
Dave Lunny
53f1cf1cb2
Migrate "User.GetProfilesWithoutTeam" to Sync by default ( #11612 )
...
* 👤 Migrates GetProfilesWithoutTeam to Sync
* 🔬 Fix tests
* 🗣 Address CR feedback
* 🏃♂️ Run `make store-mocks`
2019-07-13 08:11:59 +02:00
Rajiv Kushwaha
76f4fccf8a
Migrate "Team.ClearAllCustomRoleAssignments" to Sync by default ( #11587 )
2019-07-11 14:54:56 +01:00
Allan Guwatudde
e8f77daa8a
[MM-16562] Migrate User.GetUnreadCountForChannel to Sync by default ( #11604 )
...
* Migrate User.GetUnreadCountForChannel to Sync by default
* Remove else block from GetUnreadCountChannel in user_store.go
* Return nil value for count when an error occurs in GetUnreadCountForChannel
* Fix linting issue in user_store.go
2019-07-11 08:52:56 -04:00
Micah Thompson
903085feb8
Migrate "User.UpdateMfaActive" to Sync by default ( #11566 )
2019-07-10 14:55:17 -04:00
Phillip Ahereza
e9b82bc1ce
Migrate Plugin.DeleteAllForPlugin to Sync by default ( #11597 )
2019-07-10 14:54:38 -04:00
Allan Guwatudde
15be0c6c79
[MM-16777] Migrate Team.MigrateTeamMembers to Sync by default ( #11584 )
...
* Migrate Team.MigrateTeamMembers to Sync by default
* Remove commented out MigrateTeamMembers function
* Remove return nil when no team members in query
* Return nil when no more team members in query
* Remove commented out code lines
* Format MigrateTeamMembers code
* Return some data from MigrateTeamMembers function
* Return data and error from MigrateTeamMembers
* Use result for consistency
* Control loop to allow loop to break in storetest/team_store.go
* Fix test MigrateTeamMembers test in storetest/team_store.go
* Change err to e in storetest/team_store.go
2019-07-10 12:39:24 +02:00
Taufiq Rahman
9ce5b28c63
[MM-16667] Migrate User.GetByUsername to Sync by default #11453 ( #11520 )
...
* Migrate User.GetByUsername to Sync by default #11453
* fix app errors #11453
* fix app errors #11453
* fix cmd error #11453
* fix shadow var #11453
* fix shadow user var #11453
* fix test error
* fix test error #11453
2019-07-10 10:46:03 +02:00
Rodrigo Villablanca Vásquez
678c8f4f84
Migrate CommandWebhook.TryUse to sync by default ( #11593 )
2019-07-09 22:57:05 +02:00
Mounica Paladugu
ff89b2c8e1
[MM-16170] Migrate Team.GetTeamsByUserId to Sync by default ( #11100 )
...
* [MM-16170] Migrate Team.GetTeamsByUserId to Sync by default
* Fixing comments
2019-07-09 12:21:18 -04:00
Rodrigo Villablanca Vásquez
0ec609d159
Migrate CommandWebhook.Get to sync by default ( #11594 )
2019-07-09 11:54:25 -04:00
Mounica Paladugu
6fc0ec06b2
[MM-16168] Migrate Team.GetAllTeamListing to Sync by default ( #11102 )
...
* [MM-16168] Migrate Team.GetAllTeamListing to Sync by default
* reverting GetAllTeamPageListing modification
* Modifying app/team.go
* Simplifying code
2019-07-09 17:19:18 +02:00
Phillip Ahereza
eb0268f108
Migrate Plugin.DeleteAllExpired to Sync by default ( #11583 )
2019-07-09 17:15:35 +02:00
Rodrigo Villablanca Vásquez
25a2e7e981
Migrate CommandWebhook.Save to sync by default ( #11595 )
2019-07-09 09:42:10 -05:00
Rodrigo Villablanca Vásquez
ce61681c92
Migrate Plugin.SaveOrUpdate to sync by default ( #11592 )
2019-07-09 15:08:28 +02:00