Commit Graph

523 Commits

Author SHA1 Message Date
Pradeep Murugesan
b3c2ecd9b9 added the custom icon and username for the outgoing webhook and its response (#9141)
* 8272 added the username and icon as part of the model and persisted the same

* 8272 added the custome icon and name when set to the web hook response

* 8272 changed the infinte loop to timeout after 5 seconds

* 8272  fixed review comments
2018-07-25 08:31:41 -04:00
Hyeseong Kim
8387d92ea2 MM-10381: Change the file downloading API to stream file (#9144)
* Change the file downloading to stream file

* Change file downloading to chunk only for preview

* Remove unnecessary else case
2018-07-24 11:23:54 -07:00
Jesús Espino
e475cecf00 Remove unnecesary elses after return error (#9137) 2018-07-23 11:55:42 +05:30
Jesús Espino
b367b1ff40 Do not close the connection abruptly on too big file uploads (#9083) 2018-07-18 10:07:00 +02:00
Joram Wilander
f2c1803905 Make plugin IDs case insensitive (#9117) 2018-07-16 16:56:55 -04:00
Joram Wilander
275731578e MM-10254 Add plugin APIs for getting/updating user statuses (#9101)
* Add plugin APIs for getting/updating user statuses

* Add and update tests

* Updates per feedback
2018-07-16 15:49:26 -04:00
George Goldberg
9d9fcd9ac5 MM-11172: Don't allow reacting in read-only town square. (#9106) 2018-07-16 13:04:52 +01:00
cpanato
adc56ae78d Merge remote-tracking branch 'upstream/release-5.1' into release-5.1-daily-merge-20180712 2018-07-12 19:50:16 +02:00
Carlos Tadeu Panato Junior
7ed712f938 Restore config after finisht the test case (#9085) 2018-07-11 12:58:16 +02:00
JoramWilander
6c7dc2d29c Merge branch 'plugins-2' 2018-07-10 15:01:43 -04:00
cpanato
c042ffa460 Merge remote-tracking branch 'upstream/release-5.1' into release-5.1-daily-merge-20180710 2018-07-10 19:27:14 +02:00
George Goldberg
2d16a71af9 MM-11228: Fix channel update/patch API endpoints. (#9073) 2018-07-10 10:55:46 +02:00
Jesús Espino
602fd0ffdd MM-11189: Do not close the connection abruptly on too big emojis (#9071) 2018-07-10 10:55:24 +02:00
Christopher Speller
74e5d8ae66 MM-11120 Adding setting to disable email invitations and rate limiting. (#9063)
* 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.
2018-07-10 10:54:25 +02:00
JoramWilander
b78b216a3c Merge branch 'master' into plugins-2 2018-07-07 12:04:18 -04:00
Daniel Schalla
359f12db33 First batch of new plugin api methods (#9022)
update api mocks

Generated new hooks

ChannelHasJoinedChannel Implementation

User Left Team/Channel Hook; User Joined Team Hook Implementation

Update RPC Client and Mocks

gofmt

go tests fix

Add Config API Methods

codegne

Add Channel Has Been Created Hook

Fix ChannelHasBeenCreated hook

fix missing context param

fix duplicate hooks; remove redudandcy
2018-07-06 15:32:55 -07:00
Saturnino Abril
9e5ec7d09d [MM-10754] Remove unnecessary command_test route (#9050)
* remove unnecessary command_test route

* replaced localhost with ts.URL
2018-07-06 09:07:42 -04:00
Jesse Hallam
6b7a35b653 MM-11118: disallow deleting direct or group channels (#9054) 2018-07-05 09:17:43 +02:00
JoramWilander
3848cb7e79 Merge branch 'master' into plugins-2 2018-06-30 12:24:04 -04:00
Martin Kraft
56ba06c016 MM-10980: Conditionally filteres User json properties. (#9018) 2018-06-29 08:45:04 -04:00
JoramWilander
88c5e469ca Merge branch 'master' into plugins-2 2018-06-27 16:56:50 -04:00
Emil Velikov
f17c15c9d8 Simplify oauth (#8972)
* Remove unused OauthProvider::GetIdentifier

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>

* Reuse gitlab's getAuthData() instead of open-coding it

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>

* Remove OauthProvider::GetAuthDataFromJson interface

The data is already available via GetUserFromJson().AuthData

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2018-06-26 17:23:13 -07:00
Jesse Hallam
2d7cd02abc MM-10833: send down computed channel props (#8953)
* MM-10833: send down computed channel props

This allows channel headers to reference channel mentions for a client
that doesn't already know about the channels in question.

We intentionally don't send down the props for the autocomplete and
search endpoints since they aren't used in that context, and would add
unnecessary overhead.

* update channel props on patch

* revert to treating channel purpose as plaintext
2018-06-26 16:46:57 -04:00
Christopher Speller
1e5c432e10 MM-10702 Moving plugins to use hashicorp go-plugin. (#8978)
* Moving plugins to use hashicorp go-plugin.

* Tweaks from feedback.
2018-06-25 12:33:13 -07:00
Jesse Hallam
dd35ad43ca MM-10370: serve subpath (#8968)
* factor out GetSubpathFromConfig

* mv web/subpath.go to utils/subpath.go

* serve up web, api and ws on /subpath if configured

* pass config to utils.RenderWeb(App)?Error

This allows the methods to extract the configured subpath and redirect
to the appropriate `/subpath/error` handler.

* ensure GetSubpathFromConfig returns trailing slashes deterministically

* fix error 404 handling

* redirect /subpath to /subpath/

This is necessary for the static handler to match, otherwise none of the
registered routes find anything. This also makes it no longer necessary
to add trailing slashes in the root router.
2018-06-21 11:31:51 -07:00
Jesús Espino
344836dfb2 Add missed translations (#8959) 2018-06-19 19:40:26 +02:00
Harrison Healey
226d4b2ac8 MM-6992 Added highlighting to elasticsearch results (#8861)
* MM-6992 Added highlighting to elasticsearch results

* Added a unique type for post search matches

* Fixed Elasticsearch matches not being sent through API
2018-06-19 11:46:29 +02:00
Harrison Healey
6d8140337e MM-8701 Limit the number of client config fields sent before user logs in (#8954)
* MM-8701 Limit the number of client config fields sent before user logs in

* Fixed missing client config field

* Reduced duplication between limited and regular client config
2018-06-18 12:39:22 -04:00
Corey Hulen
656c8a62d1 Prototype for CBA (#8475)
* Prototype for CBA

* Fixing gofmt issues

* Do not require password if logging in with certificate

* Fixing issues from feedback

* Adding unit tests

* Fixing feedback
2018-06-12 10:16:39 -07:00
Carlos Tadeu Panato Junior
3bae67489f Relese5.0 merge master 20180608 (#8933)
* Add missing diagnostics (#8911)

* Update diagnostics.go

* Update diagnostics.go

* Fix push notification styling backwards compatibility (#8913)

* MM-10803: remove premature user sanitization on deactivation (#8926)

* remove unused UpdateNonSSOUserActive

* MM-10803: stop prematurely sanitizing users on deactivate

This change was preceded by the removal of UpdateNonSSOUserActive to
ensure there are no APIs relying on the sanitized return value.

* MM-10803: test websocket events after UpdateUserActive

* MM-10264: Adds system scheme to permissions import/export. (#8924)

* MM-10264: Adds system scheme to permissions import/export.

* MM-10264: Switches to more likely unique name.

* MM-10264: Changed collision prevention string.

* MM-10264: Rolls back created schemes in all error cases.

* MM-10264: Test fix for more rollback cases.
2018-06-08 17:04:17 +02:00
lisakycho
e09b3c566b Get the count of the all system users at endpoint /users/stats (#8847)
* Get the count of the all system users at endpoint /users/stats

* Added GetTotalUsersStats test in api4

* Changed pluralization and added the test back.
2018-06-07 12:45:49 -04:00
George Goldberg
0c4078b6b0 MM-9730 & MM-9729: Missing Server PRs (#8908)
* MM-9730: API endpoint to update scheme-derived roles of TeamMembers.

* MM-9729: API to update scheme-derived roles of ChannelMembers.
2018-06-05 07:41:03 -04:00
Christopher Speller
2c75247c97 MM-10348 Adding experimental hardened mode. (#8881)
* Adding experimental hardened mode.

* Sanitizing all 500 errors.
2018-06-04 09:48:26 -07:00
Saturnino Abril
312edbe531 [MM-10718] Move custom branding to TE (#8871)
* move custom branding to TE
* move brand's enterprise code to server and remove BrandInterface
2018-06-02 06:33:59 +08:00
Martin Kraft
260d7a0f85 MM-10412: Adds deleteBy prop to posts. (#8896) 2018-06-01 12:45:46 -04:00
George Goldberg
516a097e1a MM-10757: Default roles from scheme should be keyed by name not ID. (#8894)
* MM-10757: Default roles from scheme should be keyed by name not ID.

* Update permissions import/export.
2018-06-01 12:49:02 +01:00
Jesús Espino
e88fe4bb1d MM-8853: Adding MANAGE_EMOJIS and MANAGE_OTHERS_EMOJIS permissions (#8860)
* MM-8853: Adding MANAGE_EMOJIS and MANAGE_OTHERS_EMOJIS permissions

* MM-8853: Removing unnecesary emoji enterprise feature

* Create emojis migration

* Adding MANAGE_EMOJIS and MANAGE_OTHERS_EMOJIS always to system admins

* Simplifing permissions checks

* Revert "Simplifing permissions checks"

This reverts commit e2cafc1905.
2018-05-29 15:58:12 +01:00
Jesús Espino
bf4cefc349 Allow to update the teams scheme to default scheme (#8855) 2018-05-29 09:32:07 +01:00
Martin Kraft
c180cdbd1c Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-2 2018-05-28 10:35:27 -04:00
Saturnino Abril
c37d153ffb [MM-10519] Send websocket event whenever the channel has changed it's type (public|private) (#8798)
* send websocket event whenever the channel has changed it's type (public|private)

* updated per comment

Signed-off-by: Saturnino Abril <saturnino.abril@gmail.com>

* add channel_converted websocket event

Signed-off-by: Saturnino Abril <saturnino.abril@gmail.com>

* only send channel_id via websocket message for "channel_converted" event

Signed-off-by: Saturnino Abril <saturnino.abril@gmail.com>
2018-05-28 22:31:08 +08:00
Carlos Tadeu Panato Junior
c3e9c41440 [MM-1915] Add Deactivate Account - server side (#8699) 2018-05-28 16:20:08 +02:00
George Goldberg
7225abddee MM-8814: Remove implicit permission grants from post ownership. (#8391) 2018-05-28 09:46:52 -04:00
Martin Kraft
69304fb54d Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-2 2018-05-24 08:40:52 -04:00
Jesse Hallam
847c181ec9 MM-8622: Improved plugin error reporting (#8737)
* allow `Wait()`ing on the supervisor

In the event the plugin supervisor shuts down a plugin for crashing too
many times, the new `Wait()` interface allows the `ActivatePlugin` to
accept a callback function to trigger when `supervisor.Wait()` returns.
If the supervisor shuts down normally, this callback is invoked with
a nil error, otherwise any error reported by the supervisor is passed
along.

* improve plugin activation/deactivation logic

Avoid triggering activation of previously failed-to-start plugins just
becase something in the configuration changed. Now, intelligently
compare the global enable bit as well as the each individual plugin's
enabled bit.

* expose store to manipulate PluginStatuses

* expose API to fetch plugin statuses

* keep track of whether or not plugin sandboxing is supported

* transition plugin statuses

* restore error on plugin activation if already active

* don't initialize test plugins until successfully loaded

* emit websocket events when plugin statuses change

* skip pruning if already initialized

* MM-8622: maintain plugin statuses in memory

Switch away from persisting plugin statuses to the database, and
maintain in memory instead. This will be followed by a cluster interface
to query the in-memory status of plugin statuses from all cluster nodes.

At the same time, rename `cluster_discovery_id` on the `PluginStatus`
model object to `cluster_id`.

* MM-8622: aggregate plugin statuses across cluster

* fetch cluster plugin statuses when emitting websocket notification

* address unit test fixes after rebasing

* relax (poor) racey unit test re: supervisor.Wait()

* make store-mocks
2018-05-23 14:26:35 -04:00
Martin Kraft
4c683aff76 Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-2 2018-05-22 12:54:00 -04:00
Martin Kraft
eb78d273f3 Refactors migrations check. (#8814) 2018-05-21 12:10:26 +02:00
Balasankar C
d3ead7dc85 MM-10640 Set EnableUserCreation to true by default (#8815)
* Set EnableUserCreation to true by default

* Fix argument type to FormatBool

* Convert EnableUserCreation instances to pointer

* Convert to boolean in tests also

* Set value of pointer to be false

* Convert remaining EnableUserCreation instances to pointer
2018-05-18 09:57:30 -04:00
Joram Wilander
c6cbce6100 Add config setting for API team deletion (#8800) 2018-05-18 09:13:23 -04:00
Martin Kraft
e0390632b3 MM-10264: Adds CLI command to import and export permissions. (#8787)
* 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.
2018-05-17 11:37:00 -04:00
George Goldberg
463065c8ba MM-10606: License feature flag for custom schemes. (#8804)
* MM-10606: Add new field to license for custom schemes.

* Add feature flag to license check for Schemes.
2018-05-17 16:29:31 +01:00