summaryrefslogtreecommitdiffstats
path: root/app
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' into advanced-permissions-phase-1George Goldberg2018-02-1315-77/+419
|\
| * Merge branch 'master' into release-4.7Chris2018-02-1218-71/+423
| |\
| | * Add tests for the `platform server` command (#8231)Pierre de La Morinerie2018-02-121-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Cleanup app state on initialization error When returning an initialization error, the app state was not cleaned up. This is especially visible during tests, as `appCount` is not decremented, and makes the new app initialization fail. * Test the `platform server` command As the `platform server` command only exits when interrupted by a signal, it is not possible to test it as the other cobra commands. Instead we directly test the actual command function. The internal command handler is slighly refactored to take a channel in argument, and registers it as the signal handler. Nothing very different—except than controlling this channel from the outside allows the test to send the system signal itself, thus preventing the server to run forever.
| | * Remove license globals entirely (#8229)Chris2018-02-0910-38/+197
| | | | | | | | | | | | | | | | | | | | | | | | * remove license globals entirely * fix infinite recursion * test fix
| | * Eliminate utils.SetLicense calls (#8217)Chris2018-02-074-21/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * eliminate utils.SetLicense calls * test fix * another test fix * more test fixes
| | * ABC-132: sign error page parameters (#8197)Chris2018-02-073-8/+111
| | | | | | | | | | | | | | | | | | * sign error page parameters * add comments
| * | Added invite_id field to email invite url, along with validation of this ↵Jonathan2018-02-123-0/+73
| | | | | | | | | | | | field on the server (#8235)
| * | minor addition to #8238Christopher Brown2018-02-092-5/+7
| | |
| * | Don't proxy same-site image urls (#8238)Chris2018-02-092-2/+16
| | | | | | | | | | | | | | | | | | * don't proxy same-site urls * fix empty site url case
* | | Updates migration tests to reflect front-end mapping changes. (#8237)Martin Kraft2018-02-131-1/+1
| | |
* | | Fix tests. (#8244)George Goldberg2018-02-121-6/+4
| | |
* | | XYZ-51: Unit tests for and changes to SetRolePermissionsFromConfig. (#8160)Martin Kraft2018-02-092-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * XYZ-10: Role store. * XYZ-37: Update unit tests to work with database roles. * XYZ-51: Tests 'SetRolePermissionsFromConfig' against JSON from policy page. * XYZ-51: Adds permissions in non-licensed cases also. * XYZ-51: Removes some permissions from team_user role. * XYZ-51: Merge fix for change to default permissions from PR 8208. * XYZ-51: Removes unused function.
* | | AllowEditPost and PostEditTimeLimit migration (#8208)Jesús Espino2018-02-094-12/+52
| | | | | | | | | | | | | | | | | | | | | | | | * AllowEditPost and PostEditTimeLimit migration * Not set EDIT_POST permission to sysadmin_role if ALLOW_EDIT_POST is configured to NEVER * Remove a bit of code duplication
* | | Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-1Jesús Espino2018-02-0722-49/+141
|\ \ \ | | |/ | |/|
| * | PLT-7537: Move channel CLI command posts system message to channel. (#8161)Vordimous2018-02-072-4/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [PTL-7537] implement feature and test * [PTL-7537] Update feature to post the the room requiring a username flag to be used * [PTL-7537] update tests with username * update test to remove changes to the test helper struct * use the basic team and user
| * | XYZ-35: Added Support for GlobalRelay Compliance Export FormatJonathan2018-02-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Added username to ChannelMemberHistory struct in anticipation of supporting GlobalRelay in Compliance Export * Removed translation from debug output - this makes it complicated to use utils functions from tests in the enterprise repo * Added an advanced email function that allows for greater control over message details. Updated MessageExport config to support GlobalRelay. Added attachment support to InBucket unit tests * Moving templates in from enterprise to solve test issues * Added export format to diagnostics * Changed email attachment code to use FileBackend so that S3 storage is properly supported
| * | allow plugins to set command hints (#8214)Chris2018-02-071-0/+1
| | |
| * | Abort on critical error during server startup (#8204)Pierre de La Morinerie2018-02-074-7/+64
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only a handful of critical errors are present in the codebase. They all occur during server startup (in `app.StartServer()`). Currently, when one of these critical error occurs, it is simpled mentionned in the logs – then the error is discarded, and the app attempts to continue the execution (and probably fails pretty quickly in a weird way). Rather than continuing operations in an unknow state, these errors should trigger a clean exit. This commit rewrites critical startup errors to be correctly propagated, logged, and then terminate the command execution. Additionnaly, it makes the server return a proper error code to the shell.
| * add App.License, remove utils.IsLicensed / utils.License calls (#8203)Chris2018-02-0615-38/+45
| |
* | Merge branch 'master' into advanced-permissions-phase-1George Goldberg2018-02-0615-65/+429
|\|
| * handle RateLimiter initialization errors (#8199)Pierre de La Morinerie2018-02-053-9/+28
| | | | | | | | | | Previously, an error occuring in NewRateLimiter would return a nil reference – which would be de-referenced just after, making the server crash.
| * Add missing diagnostics for v4.7 (#8195)Jason Blais2018-02-051-1/+5
| |
| * ABC-179: check email verification last (#8172)Jesse Hallam2018-02-051-5/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ABC-179: check email verification last This change changes the authentication checks to be: * "preflight checks" ** mfa ** not disabled ** login attempts * password * "postflight checks" ** email verified Checking whether the email is verified or not last avoids the weird edge case where entering any bogus password for an account with an unverified email shows a message about verifying the email and offering to resend. * fix invalid unit test assertion Client.CreateUser returns a user whose password has been sanitized. Adopt the pattern in the previous assertions to use a new variable name and test the password on the original model.User object. This didn't expose any underlying broken behaviour, but the test wouldn't have caught it if it had regressed. Also fix a minor typo.
| * Update zoom plugin to latest (#8194)Joram Wilander2018-02-023-6/+6
| |
| * Fix panic when invalid types used in post props (#8191)Joram Wilander2018-02-021-6/+6
| |
| * ABC-153: don't use http redirects with 4xx/5xx status codes (#8178)Chris2018-02-021-1/+1
| | | | | | | | | | | | * don't use http redirects with 4xx/5xx status codes * minor html syntax fix
| * fix image url replacement for blank urls (#8184)Chris2018-02-012-1/+7
| |
| * [PLT-8494] Add delete_team websocket event (#8167)Saturnino Abril2018-02-011-4/+8
| | | | | | | | | | | | * add delete_team websocket event * add to PermanentDeleteTeam
| * User based rate limiting (#8152)Christopher Speller2018-01-315-30/+318
| |
| * ABC-79: Optimize channel autocomplete query (#8163)Chris2018-01-311-0/+8
| | | | | | | | | | | | * optimize channel autocomplete query * move to new autocomplete endpoint
| * Moving to golang.org/x/crypto/acme/autocert for Let's Encrypt functionality. ↵Christopher Speller2018-01-301-13/+28
| | | | | | | | (#8165)
| * Used a consistent tense for system messages (#8079)Harrison Healey2018-01-261-1/+1
| |
* | XYZ-37: Advanced Permissions Phase 1 Backend. (#8159)George Goldberg2018-02-0611-53/+567
|/ | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* PLT-3658 Added support for Slack attachments in outgoing webhook response ↵Joey Lee2018-01-261-2/+13
| | | | (#7774) (#8102)
* XYZ-32: Increases size of position to 128 characters. (#8148)Martin Kraft2018-01-261-1/+1
| | | | | | | | | | * XYZ-32: Changes type of 'position' column on 'users' table. * XYZ-32: Uncomment to run on CI and pre-release. * XYZ-32: Reverts translation changes. * XYZ-32: Fix for gofmt.
* Add GET /emojis/name/{emoji_name} API endpoint (#8142)Joram Wilander2018-01-241-0/+16
|
* [ICU-621] Add ExperimentalGroupUnreadChannels setting (#8127)enahum2018-01-231-0/+1
| | | | | | * Add ExperimentalGroupUnreadChannels setting * track ExperimentalGroupUnreadChannels in diagnostics
* Merge branch 'release-4.6'Harrison Healey2018-01-233-33/+64
|\
| * Update diagnostics.go for 4.6 release (#8082)Jason Blais2018-01-101-27/+40
| | | | | | | | | | | | * Update diagnostics.go * Fix formatting error
| * PLT-8522 Added separate messages for being removed from channel or team (#8078)Harrison Healey2018-01-102-6/+24
| |
* | use markdown parsing to identify mentions (#8139)Chris2018-01-232-392/+338
| |
* | set from_webhook if a builtin slash command overrides username or icon (#8143)Chris2018-01-231-3/+9
| |
* | ABC-90 Add POST /emoji/search and GET /emoji/autocomplete API endpoints (#8125)Joram Wilander2018-01-231-2/+14
| | | | | | | | | | | | * Add POST /emoji/search and GET /emoji/autocomplete API endpoints * Add constant to be clearer
* | PLT-3383: image proxy support (#7991)Chris2018-01-224-5/+212
| | | | | | | | | | | | | | | | | | | | | | | | * image proxy support * go vet fix, remove mistakenly added coverage file * fix test compile error * add validation to config settings and documentation to model functions * add message_source field to post
* | Add sort query parameter to GET /emojis (#8121)Joram Wilander2018-01-191-2/+2
| |
* | Post a system message to the affected channel by CLI command (#7877) (#7968)Evgeniy2018-01-182-0/+56
| |
* | Handle missed case with ExperimentalEnableDefaultChannelLeaveJoinMessages ↵Joram Wilander2018-01-182-8/+10
| | | | | | | | setting (#8112)
* | Finally remove utils.Cfg (#8113)Chris2018-01-178-39/+26
| | | | | | | | | | | | | | | | * finally remove utils.Cfg * fix compile error * another test compilation fix
* | ABC-22: Plugin sandboxing for linux/amd64 (#8068)Chris2018-01-151-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * plugin sandboxing * remove unused type * better symlink handling, better remounting, better test, whitespace fixes, and comment on the remounting * fix test compile error * big simplification for getting mount flags * mask statfs flags to the ones we're interested in
* | Remove global cfg vars (#8099)Chris2018-01-126-27/+186
| | | | | | | | | | | | * remove global cfg vars * enterprise update