Commit Graph

187 Commits

Author SHA1 Message Date
Ali Farooq
2ecca12bed MM-15452 - Add ability to override LHS icon for bot accounts (#11423)
* MM-15452 - Add ability to override LHS icon for bot accounts

* MM-15452 - Added translations

* MM-15452 - Updated GetIconImage test to check returned image

* MM-15452 - Added Delete handler for /icon endpoint, invalidating user cache on set/delete

* MM-15452 - Moved /icon routes under bot/, addressed other pr feedback

* MM-15452 - More conflict resolutoin

* MM-15452 Restoring api4/user.go

* MM-15452 - Using require as opposed to t for test assertions

* MM-15452 - Updated as per PR feedback
2019-07-06 08:56:21 +02:00
Phillip Ahereza
c34942afec Migrate "User.GetProfilesByUsernames" to Sync by default (#11523)
* changed GetProfilesByUsernames signature

* modified the UserStore interface to reflect changed made to the GetProfilesByUsernames function signature

* modify usages of GetProfilesByUsernames

* fix gofmt

* fixed failing userstore tests
2019-07-05 15:19:40 -04:00
Rodrigo Villablanca Vásquez
aa14c9bbdb Migrate User.GetProfiles to sync by default (#11512) 2019-07-05 19:57:01 +02:00
Rodrigo Villablanca Vásquez
11f1accac6 11460 user.get all profiles in channel (#11515) 2019-07-05 16:18:45 +02:00
Adzim Zul Fahmi
8dfd3bab20 make user.Get all return []*model.User and *model.AppError (#11516)
run mock generate
2019-07-05 09:39:14 -04:00
Marc Argent
2f9d509284 GH-11469 Migrate User.UpdateLastPictureUpdate to Sync by default (#11493)
* GH-11469 Migrate User.UpdateLastPictureUpdate to Sync by default

* GH-11469 log error on failure
2019-07-04 14:59:10 +02:00
Rodrigo Villablanca Vásquez
cf695095d8 Migrate User.GetEtagForAllProfiles to sync by default (#11509) 2019-07-04 14:30:23 +02:00
Rodrigo Villablanca Vásquez
9839b46889 Migrate User.GetAllProfiles to sync by default (#11513) 2019-07-04 14:14:34 +02:00
Rodrigo Villablanca Vásquez
b738e02c15 Migrate User.GetProfileByIds to sync by default (#11510) 2019-07-04 11:57:12 +02:00
Rodrigo Villablanca Vásquez
c0c93a1b09 Migrate User.GetEtagForProfiles to sync by default (#11508) 2019-07-04 10:05:27 +02:00
Alex Sahin
f8c9f881c9 migrated to sync by default (#11488) 2019-07-03 09:05:09 -04:00
Alexander Redinger
0b6e4e2f16 Migrate 'User.GetProfilesNotInTeam' to Sync by default (#11420) 2019-07-02 17:57:53 +02:00
Micah Thompson
0d5020e566 [MM-16652] Migrate "User.ResetLastPictureUpdate" to Sync by default (#11474)
* [MM-16652] Migrate "User.ResetLastPictureUpdate" to Sync by default

* [Suggested Changes] Added mlog for error and removed return of userid
2019-07-01 22:07:59 +02:00
Alex Sahin
1aa1363e63 [MM-16568] Migrate "User.SearchInChannel" to Sync by default (#11417)
* implemented migration to sync

* updated user.go to use explicit async approach
2019-07-01 12:44:09 +02:00
Deepak Sah
f8ba59ca9e [MM-16567] Migrate "User.SearchNotInTeam" to Sync by default (#11471) 2019-06-29 00:24:46 +02:00
Harrison Healey
4b96437370 MM-16477 Add api to get users modified since a given time (#11406)
* MM-16477 Add api to get users modified since a given time

* Address feedback
2019-06-27 09:37:03 -04:00
Maxim Zaks
89a41dc381 Migrate "User.SearchWithoutTeam" to Sync by default (#11421) 2019-06-27 13:44:53 +01:00
Deepak Sah
77ed6015fd [MM-16513] Migrate Token.Delete to Sync by default (#11365)
* Made changes to TokenStore interface, Delete()

* Modified user.go

* Refactored app/user.go
2019-06-27 13:14:17 +02:00
Claudio Costa
eb8b475497 Migrate User.GetTeamGroupUsers to Sync by default (#11414) 2019-06-27 15:59:49 +08:00
Claudio Costa
44b9fe3110 MM-16579 Migrate User.GetChannelGroupUsers to Sync by default (#11412)
* Migrate User.GetChannelGroupUsers to Sync by default

* Directly return Store results
2019-06-26 18:42:21 +02:00
Alex Sahin
6ff393527e implemented migration to sync (#11413) 2019-06-26 16:51:02 +02:00
Sheshagiri Rao Mallipedhi
00bb39b2bd Migrate Channel.GetAllChannelMembersForUser to Sync by default (#11234)
* Migrate Channel.GetAllChannelMembersForUser to Sync by default

* fix gofmt for sqlstore/channel_store.go
2019-06-26 16:20:02 +02:00
krjn
72d482de0e [MM-16512] Migrate Token.Save to Sync by default (#11353)
* [MM-16512] Migrate Token.Save to Sync by default

* refactor: formatting

* test: add checks for errors while saving tokens

* test: fixup
2019-06-26 16:06:41 +05:30
Shota Gvinepadze
eea898c6e0 Migrate 'UserAccessToken.DeleteAllForUser' to Sync by default (#11320) 2019-06-26 12:15:29 +02:00
Shobhit Gupta
879883e9a3 Migrate "Channel.PermanentDeleteMembersByUser" to Sync by default (#11243)
* Change PermanentDeleteMembersByUser to sync by default

* Address comments
2019-06-26 12:09:29 +02:00
Jesús Espino
6df57d7a83 Migrate User Store methods related to enterprise to sync by default (#11332) 2019-06-26 10:41:45 +02:00
Rodrigo Villablanca Vásquez
d17bdc6764 Migrates Channel.GetMembersForUser to sync by default (#11236) 2019-06-26 09:19:48 +02:00
Miguel de la Cruz
9e9b008f3d [MM-13500] Adds channel /search_group endpoint (#10805)
* [MM-13500] Adds channel /search_group endpoint

* Add LIMIT to the queries

* Fix i18n extract

* Fix tests

* Add a new endpoint to get profiles by group channel ids

* Rebase fix
2019-06-22 00:14:21 +01:00
krjn
604e247135 [MM-16514] Migrate Token.GetByName to Sync by Default (#11355)
* [MM-16514] Migrate Token.GetByToken to Sync by default

* test: use testify

* fix: shadowing
2019-06-22 00:20:27 +02:00
Jesús Espino
e3504398c7 Migrate OAuth store to sync by default (#11319)
* Migrate OAuth store to sync by default

* Removing unnecesary return oldValue for updateApp in Oauth Store
2019-06-21 18:21:18 +02:00
Shobhit Gupta
8853a71f0b Migrate Channel.UserBelongsToChannels to Sync by default (#11269)
* Migrate Channel.UserBelongsToChannels to Sync by default

* Address comments
2019-06-18 21:02:09 +02:00
Miguel de la Cruz
406dcb1311 [MM-15811] Adds fallback mechanism for elasticsearch queries (#11065)
* [MM-15811] Adds fallback mechanism for elasticsearch queries

* Rename config helpers
2019-06-18 14:43:08 +01:00
Rodrigo Villablanca Vásquez
a7278169d2 Channel.GetTeamChannels to sync by default (#11211) 2019-06-18 07:22:37 +02:00
Sheshagiri Rao Mallipedhi
7d08efc335 Migrate Channel.GetChannelsByIds to Sync by default (#11197)
* Migrate Channel.GetChannelsByIds to Sync by default

* remove <-
2019-06-17 14:45:51 -04:00
Bolarinwa Balogun
7d77420962 [MM-16171] Migrate "Team.GetByInviteId" to Sync by default (#11137) 2019-06-13 14:21:09 +02:00
Jesper Hansen
539de0d593 MM-15844: migrate post permanentdeletebyuser to sync by default #10984 (#11056) 2019-06-13 08:19:52 +02:00
Bolarinwa Balogun
58e126b910 MM-15801 Migrate "Session.UpdateRoles" to Sync by default (#11015) 2019-06-12 20:45:47 +02:00
Jesús Espino
76bab4f0c2 Migrating User Store VerifyEmail, GetByAuth and GetByEmail functions to sync by default (#10941) 2019-06-12 19:30:50 +02:00
Miguel de la Cruz
330a21a994 [MM-16005] Check listOfAllowedChannels to be a not nil empty slice (#11050)
* [MM-16005] Check listOfAllowedChannels to be a not nil empty slice

The problem here had to do with the return type for a `nil`
`[]string`. If `listOfAllowedChannels` is an empty list, that means
that the user doesn't have permissions to view anything, hence we have
to return an empty result. If it is `nil`, there are no restrictions
and we can proceed.

`[]string(nil)` behaves both as a `nil` value and as an "empty" slice,
so this improves the check to be able to distinguish between both
cases.

* Add documentation to the GetViewUsersRestrictionsForTeam function
2019-06-06 13:44:06 +01:00
Martin Kraft
c8646eae51 MM-15947: Prevents new user creation with invite link to group-constrained team. (#11023) 2019-06-03 12:38:33 -04:00
Woolim Cho
d1f81842a5 [MM-15799] Migrate "Session.PermanentDeleteSessionsByUser" to Sync by default (#11038) 2019-06-03 13:22:02 +02:00
Ishank Gulati
3b25e09b99 [GH-10866] Preferrence.Save - Remove preference length return arg (#10962) 2019-05-29 09:54:56 -04:00
Elias Nahum
9dc14d63b7 Trim leading and trailing spaces for search terms (#10989) 2019-05-28 13:04:12 -04:00
Jesús Espino
fb237cc624 Migrate User.Update method to sync by default (#10942) 2019-05-28 09:40:29 +02:00
Ishank Gulati
fb6c1debf0 [MM-15296] Migrate "Preference.Save" to Sync by default (#10866)
* response format changes

* Generated mocks
Fixed all references of Preferences.Save

* Remove old code from store.go (incorrect merge)

* Review change - Add validations on count and error

* Review change - return from root level

* Review change - return 0 as nil value for int

* fix initialisation of err in preference_store
2019-05-26 15:06:33 +02:00
Jesús Espino
1269db8691 Migrate User.PermanentDelete to Sync by default (#10876) 2019-05-24 15:16:15 +02:00
Devin Binnie
9652b49569 [MM-15300] Migrate "Preference.PermanentDeleteByUser" to Sync by default (#10860)
* [MM-15300] Migrate "Preference.PermanentDeleteByUser" to Sync by default

* [MM-15300] Fixed readability on the SQL statement
2019-05-20 13:46:41 +02:00
Miguel de la Cruz
098dbc84cc [MM-14751] Adds group_constrained filter to user list and search endpoints (#10678) 2019-05-16 10:12:06 +01:00
Jesús Espino
beb7592c93 Migrate FileInfo store to Sync by default (#10837) 2019-05-15 22:07:03 +02:00
Jesús Espino
584ec68755 MM-15021: Adding new builtin system schema for Guests (#10601)
* MM-15021: Adding new builtin system schema for Guests

* Fixing tests

* Setting properly the permissions

* Adding guests to sampledata

* Restrict more roles updates in the app layer for guests

* Adding comment to explain that permissions migration must go at the end

* Setting the default guest role for custom scheme during migration

* Fixing import and export

* Creating scheme guest roles on migration

* Fixing tests

* Fixing tests

* Fixing tests
2019-04-30 20:36:21 +02:00