summaryrefslogtreecommitdiffstats
path: root/api4/team_test.go
Commit message (Collapse)AuthorAgeFilesLines
* Move file backend to its own service (#9435)Jesús Espino2018-09-201-6/+7
| | | | | | * Move file backend to its own service * Moving utils/inbucket to mailservice package
* MM-11520: Make entity ID checks consistent across api4. (#9395)George Goldberg2018-09-141-5/+2
| | | | | | * MM-11520: Make entity ID checks consistent across api4. * Update tests.
* add megacheck as makefile target (#9288)Daniel Schalla2018-09-031-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | Fix code issues in channel_test.go Fix Channel Test Issues detected by Megacheck Fix API Emoji Test Issues detected by Megacheck Fixed API Issues Reported by Megacheck Fixed App issues reported by megacheck Remaining fixes removed test added by mistake from old HEAD gofmt Store Fixes simplified returns Fix test for multi member channel delete revert to delete unused function
* MM-11327: Restrict Teams by Email (#9142)Gabe Van Engel2018-08-281-61/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Check a team's AllowedDomains setting before adding users to the team. * Updated AddUser tests to validate AllowedDomains restriction. * Updated variable name to match convention. * Removed AllowedDomains from team sanitization. * Update AppError's Where to match the calling function. * Added tests for user matching allowedDomains, and multi domain values of allowedDomains. * Added test to make sure we block users who have a subdomain of a whitelisted domain. * Revert "Removed AllowedDomains from team sanitization." This reverts commit 17c2afea584da40c7d769787ae86408e9700510c. * Update sanitization tests to include dockerhost, now that we enforce AllowedDomains. * Added tests to verify the interplay between the global and per team domain restrictions. * Validate AllowedDomains property against RestrictCreationToDomains before updating a team. * Remove team.AllowedDomains from sanitization. * Add i18n string for the team allowed domains restriction app error.
* Restore config after finisht the test case (#9085)Carlos Tadeu Panato Junior2018-07-111-2/+12
|
* MM-11120 Adding setting to disable email invitations and rate limiting. (#9063)Christopher Speller2018-07-101-0/+9
| | | | | | | | | | * Adding setting to disable email invitations. * Adding a setting and rate limiting for email invite sending. * Modifying email rate limit to 20/user/hour * Adding EnableEmailInvitations to client side config and command.
* MM-9730 & MM-9729: Missing Server PRs (#8908)George Goldberg2018-06-051-0/+75
| | | | | | * MM-9730: API endpoint to update scheme-derived roles of TeamMembers. * MM-9729: API to update scheme-derived roles of ChannelMembers.
* Allow to update the teams scheme to default scheme (#8855)Jesús Espino2018-05-291-0/+4
|
* Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-2Martin Kraft2018-05-221-12/+15
|\
| * Add config setting for API team deletion (#8800)Joram Wilander2018-05-181-12/+15
| |
* | Refactors migrations check. (#8814)Martin Kraft2018-05-211-10/+1
| |
* | MM-10264: Adds CLI command to import and export permissions. (#8787)Martin Kraft2018-05-171-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * MM-10264: Adds CLI command to import and export permissions. * MM-10264: Changes Scheme Name to DisplayName and adds Name slug field. * MM-10264: Changes display name max size. * MM-10264: Another merge fix. * MM-10264: Changes for more Schemes methods checking for migration. * MM-10264: More updates for Schemes migration checking.
* | MM-9728: Online migration for advanced permissions phase 2 (#8744)George Goldberg2018-05-141-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * MM-9728: Online migration for advanced permissions phase 2 * Add unit tests for new store functions. * Move migration specific code to own file. * Add migration state function test. * Style fixes. * Add i18n strings. * Fix mocks. * Add TestMain to migrations package tests. * Fix typo. * Fix review comments. * Fix up the "Check if migration is done" check to actually work.
* | MM-10182 & MM-10183: Adds channel scheme and team scheme API endpoint. (#8680)Martin Kraft2018-05-021-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | * MM-10183: Adds channel scheme API endpoint. MM-10182: Adds team scheme API endpoint. MM-10182_3: Switch from scheme_id in path to body. * MM-10182/MM-10183: Changes path from 'schemes' to 'scheme'. * MM-10182: Fix merge error.
* | Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-2Martin Kraft2018-05-011-0/+37
|\|
| * [MM-10354] Add feature to remove team icon (#8684)Saturnino Abril2018-04-301-0/+37
| | | | | | | | | | | | | | | | * set team.LastTeamIconUpdate to 0 when removing team icon * add APIv4 for removing team icon * removed comment and updated typo on AppError
* | MM-8796: Full implementation of "Schemes" in Store/Model/App layers. (#8357)George Goldberg2018-04-201-2/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add Scheme model and stub store. * Port ChannelStore to be Scheme aware. * Make almost all the API/APP layer work with ChannelSchemes. Only thing still hacky is UpdateChannelMemberRoles(). * Add basic SchemeStore implementation. * Migrate UpdateChannelMemberRoles properly and fix tests. * Update store tests and mocks so they work. * Include creating default roles in Scheme create store function. * Implement role deletion and start scheme deletion. * Only use non-deleted roles for authorization. * Add GetByScheme method to Team store. * Add GetChannelsByScheme. * Update store mocks. * Implement scheme deletion in the store. * Rename is valid function. * Add offset and limit to queries to fetch teams and channels by scheme. * Fix queries. * Implement scheme awareness in Team store and add a migration. * Tidy up ChannelStore mapping functions and add exhaustive unit tests. * Add all missing i18n. * Proper tests for TeamStore internal functions and fix them. * Make additional TeamMember fields nullable. * Make new ChannelMember fields nullable. * Create new nullable columns without defaults. * Make new fields in large tables nullalble. * Fix empty list of TeamMembers. * Deduplicate SQL queries. * Fix spelling. * Fix review comment. * More review fixes. * More review fixes.
* MM-9779: Incorporate a Token into the invitations system (#8604)Jesús Espino2018-04-181-25/+31
| | | | | | | | | | | | | | | | | | | | * Incorporate a Token into the invitations system * Adding unit tests * Fixing some api4 client tests * Removing unnecesary hash validation * Change the Hash concept on invitations with tokenId * Not send invitation if it wasn't able to create the Token * Fixing some naming problems * Changing the hash query params received from the client side * Removed unneded data param in the token usage
* MM-9999 Fix unwanted team invite_id in email invites. (#8550)Christopher Speller2018-03-291-1/+0
| | | | | | * Fix unwanted team invite_id in email invites. * Removing unused translation.
* Fixing misspell errors (#8544)Jesús Espino2018-03-291-1/+1
|
* Merge branch 'master' into advanced-permissions-phase-1Martin Kraft2018-03-231-0/+26
|\
| * Fix paging for GET /teams and GET /teams/{id}/members endpoints (#8488)Joram Wilander2018-03-211-0/+26
| |
* | Merge branch 'master' into advanced-permissions-phase-1George Goldberg2018-03-021-0/+81
|\|
| * PLT-7567: Integration of Team Icons (#8284)Christian Hoff2018-03-011-0/+81
| | | | | | | | | | | | | | | | | | | | * PLT-7567: Integration of Team Icons * PLT-7567: Read replica workaround, upgrade logic moved, more concrete i18n key * PLT-7567: Read replica workaround, corrections * PLT-7567: upgrade correction
* | Merge branch 'master' into advanced-permissions-phase-1George Goldberg2018-02-131-5/+2
|\|
| * Merge branch 'master' into release-4.7Chris2018-02-121-65/+6
| |\
| | * Eliminate utils.SetLicense calls (#8217)Chris2018-02-071-65/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * eliminate utils.SetLicense calls * test fix * another test fix * more test fixes
| * | Added invite_id field to email invite url, along with validation of this ↵Jonathan2018-02-121-1/+2
| |/ | | | | | | field on the server (#8235)
* / XYZ-37: Advanced Permissions Phase 1 Backend. (#8159)George Goldberg2018-02-061-97/+30
|/ | | | | | | | | | | | | | | | | | | | | | | | | | * XYZ-13: Update Permission and Role structs to new design. * XYZ-10: Role store. * XYZ-9/XYZ-44: Roles API endpoints and WebSocket message. * XYZ-8: Switch server permissions checks to store backed roles. * XYZ-58: Proper validation of roles where required. * XYZ-11/XYZ-55: Migration to store backed roles from policy config. * XYZ-37: Update unit tests to work with database roles. * XYZ-56: Remove the "guest" role. * Changes to SetDefaultRolesFromConfig. * Short-circuit the store if nothing has changed. * Address first round of review comments. * Address second round of review comments.
* Finally remove utils.Cfg (#8113)Chris2018-01-171-23/+23
| | | | | | | | * finally remove utils.Cfg * fix compile error * another test compilation fix
* [PLT-8430] Auto lowercase team and channel names in API requests (#7992)Carlos Tadeu Panato Junior2018-01-121-0/+3
|
* [PLT-6936] Translate AppError.Message automatically by default (#8063)Jesús Espino2018-01-081-1/+1
|
* Remove utils.ClientCfg and utils.ClientCfgHash (#8041)Chris2018-01-051-1/+1
| | | | | | * remove utils.ClientCfg and utils.ClientCfgHash * remove unused import
* Allow for custom subject in TestInviteUsersToTeam (#7999)Chris Duarte2018-01-021-1/+5
|
* Role refactor (#7867)Chris2017-11-211-15/+15
| | | | | | | | * role refactor * add missing file * fix web test
* PLT-6217 Fixes system message posted to Town Square when a member leaves a ↵Tsilavina Razafinirina2017-11-201-2/+2
| | | | | | | | | | | | | | | | | | team (#7752) * Fixes system message posted to Town Square when adding/removing team member (#6483) Fixes unit test method call to match RemoveUserFromTeam modification (#6483) Fixes system message posted to Town Square when adding/removing team member (#6483) Removes unnessary error message * Updates system message when a user leaves a team (#6483) * Changes system message when a user is removed from team (#6483) * Adds a new string to be post to town-square when a member is added to a team (#6483)
* simplify things (#7735)Chris2017-10-301-5/+5
|
* add model.NewX funcs for builtin types (#7692)Chris2017-10-231-10/+5
| | | | | | * add model.NewX funcs for builtin types * whoops, forgot to add the new file
* Reduce utils.Cfg references (#7650)Chris2017-10-181-23/+23
| | | | | | | | | | | | * app.UpdateConfig method * test fix * another test fix * the config override option as-was is just error prone, remove it for now * derp
* PLT-7811 Standardized team sanitization flow (#7586)Harrison Healey2017-10-091-14/+455
| | | | | | | | | | | | | | | | | | * post-4.3 commit (#7581) * reduce store boiler plate (#7585) * fix GetPostsByIds error (#7591) * PLT-7811 Standardized team sanitization flow * Fixed TestGetAllTeamListings * Stopped sanitizing teams for team admins * Removed debug logging * Added TearDown to sanitization tests that needed it
* Don't use global app for api / api4 tests (#7528)Chris2017-10-021-30/+30
| | | | | | | | | | | | | | * don't use global app for api / api4 tests * put sleep back. we're gonna have to do some goroutine wrangling * fix oauth test config assumptions * jobs package, i'm comin' for you next * app test fix * try increasing sleep a little
* Renaming repoChristopher Speller2017-09-061-2/+2
|
* app type transition (#7167)Chris2017-09-061-11/+10
|
* [PLT-7390] Add Type = 'O' in getting open teams at sql store (#7207)Saturnino Abril2017-08-241-4/+12
| | | | | | * add Type = 'O' in getting open teams at sql store * updated PR
* Merge branch 'release-4.1'Christopher Speller2017-08-171-4/+26
|\
| * disable intermittently failing test at TestGetAllTeams temporarily (#7211)Saturnino Abril2017-08-151-2/+4
| |
| * Update unit testJoramWilander2017-08-091-0/+4
| |
| * Minor updates to teamJoramWilander2017-08-081-2/+18
| |
* | PLT-6226 Fixing races with licensing (#7213)Corey Hulen2017-08-161-28/+28
|/ | | | | | | | | | * PLT-6226 Fixing races with licensing * Fixing build issue * Fixing licensing issue * removing commented code
* PLT-6983 Allowed team invite IDs of arbitrary lengths to match API v3 (#6944)Harrison Healey2017-07-151-3/+10
|