Commit Graph

254 Commits

Author SHA1 Message Date
Joram Wilander
a12cf549cf Set charset for OAuth2 authorize page (#7304) 2017-08-28 10:04:52 -04:00
George Goldberg
50fc6e1e9e PLT-???? Prepare file upload infrastructure for Data Retention. (#7266)
* Prepare file upload infrastructure for Data Retention.

This commit prepares the file upload infrastructure for the data
retention feature that is under construction. Changes are:

* Move file management code to utils to allow access to it from jobs.

* From now on, store all file uploads in a top level folder which is the
  date of the day on which they were uploaded.

This commit is based on Harrison Healey's branch, but updated to work
with the latest master.

* Use NewAppError
2017-08-25 10:38:13 -04:00
Saturnino Abril
f6e0310b50 [PLT-7390] Add Type = 'O' in getting open teams at sql store (#7207)
* add Type = 'O' in getting open teams at sql store

* updated PR
2017-08-24 00:19:15 +08:00
Corey Hulen
7dad3965a6 Switch hook debug msg to info (#7272) 2017-08-22 15:57:02 -07:00
Corey Hulen
4a8afebcdb Adding debugging for webhook (#7199)
* Adding debugging for webhook

* Fixing build error

* Moving error down
2017-08-18 15:58:26 -07:00
Chris
2c895ee66e webhook merge fix (#7250) 2017-08-17 15:07:47 -07:00
Christopher Speller
fd1301779f Merge branch 'release-4.1' 2017-08-17 09:35:36 -07:00
George Goldberg
22459ee17a PLT-7302: Aggregate Elasticsearch indexes over a certain age. (#7224)
* PLT-7302: Aggregate Elasticsearch indexes over a certain age.

This is done by a scheduled daily job, in order to keep the shard count
to a sensible level in Elasticsearch.

* Use map[string]string instead of StringMap
2017-08-17 10:05:17 -04:00
Corey Hulen
0ab490845a PLT-6226 Fixing races with licensing (#7213)
* PLT-6226 Fixing races with licensing

* Fixing build issue

* Fixing licensing issue

* removing commented code
2017-08-16 09:51:45 -07:00
Chris
b122381e87 PLT-1649: add response_url support for custom slash commands (#6739)
* add response_url support for custom slash commands

* pr suggestions

* pr update / suggestion

* test fix
2017-08-16 08:17:57 -04:00
Joram Wilander
0033e3e37b PLT-7408 Move webhook handling into api4 package to fix EnableAPIv3 config setting (#7219)
* Move webhook handling into api4 package to fix EnableAPIv3 config setting

* Fix unit test
2017-08-16 04:25:36 +08:00
Saturnino Abril
fcd56927df disable intermittently failing test at TestGetAllTeams temporarily (#7211) 2017-08-15 23:03:39 +08:00
Chris
ffbf8e51fe PLT-6358: Server HTTP client improvements (#6980)
* restrict untrusted, internal http connections by default

* command test fix

* more test fixes

* change setting from toggle to whitelist

* requested ui changes

* add isdefault diagnostic

* fix tests
2017-08-09 13:49:07 -07:00
KenmyZhang
504582b824 when session id is invalid,the function "revokeSession" should return (#7127) 2017-08-09 13:36:59 -07:00
Jonathan
fd6856b674 PLT-7206: Remove the "Delete Channel" option for private channels if you're the last channel member and policy setting restricts channel deletion (#7050)
* PLT-7206: UI changes. Removed last user in channel loophole, refactored code to clean it up, added differentiated support for public and private channels, added unit tests. Still need to implement server-side checks

* PLT-7206: All helper methods in channel_utils.jsx now accept the same three boolean variables in the same order and use the same boolean logic to check their values.

* PLT-7206: Added unit tests for showManagementOptions(...)

* PLT-7206: Fixed test case descriptions

* Added unit tests for showCreateOption(...)

* PLT-7206: Added unit tests for canManageMembers(...)

* PLT-7206: Removed last person in channel loophole from server-side code

* PLT-7206: Reverted config.json

* PLT-7206: Fixed double negatives in unit test names

* PLT-7206: PR feedback - Removed confusing comment and unused variable
2017-08-09 09:34:09 -04:00
JoramWilander
d780ac6e27 Update unit test 2017-08-09 09:33:30 -04:00
JoramWilander
1885d2ec2a Minor updates to team 2017-08-08 16:20:07 -04:00
Harrison Healey
6964ae61dc Added unit tests for getFile headers (#7045)
* Added unit tests for getFile headers

* Fixed exe type test to run correctly on multiple platforms

* Make sure we close the body on all Client4 calls

* Changed Response.Response field to Response.Header

* Clarified type of Response.Header
2017-08-08 23:47:17 +08:00
Harrison Healey
885c7e277d PLT-7261 Fixed incorrect content type for preview and thumbnail images (#7119) 2017-08-04 09:05:16 -04:00
enahum
fa3dd6a84b If login is using mobile respond with JSON object (#7030) 2017-08-03 02:39:14 +08:00
Joram Wilander
5da5c0bbfb PLT-6987 User access token UI (#7007)
* Add user access token UI

* Fix enter press and update mattermost-redux

* Updating UI for access token stuff (#7066)

* Revert segment key
2017-08-01 11:06:53 -04:00
Saturnino Abril
88f398ffdd Revert " #4755 Combining consecutive user join/leave system messages to single message and few other changes." (#7072)
* Revert "PLT-6603: Don't return all posts on invalid query. (#7061)"

This reverts commit 25a2013890.

* Revert " #4755 Combining consecutive user join/leave system messages to single message and few other changes. (#5945)"

This reverts commit 8a91235fb3.
2017-08-01 08:16:45 -04:00
Debanshu Kundu
8a91235fb3 #4755 Combining consecutive user join/leave system messages to single message and few other changes. (#5945)
fix 7 and 8

remove @ at "{username} joined the channel"

refactor and update test
2017-08-01 02:17:21 +08:00
Joram Wilander
59992ae4a4 PLT-6763 Implement user access tokens and new roles (server-side) (#6972)
* Implement user access tokens and new roles

* Update config.json

* Add public post permission to apiv3

* Remove old comment

* Fix model unit test

* Updates to store per feedback

* Updates per feedback from CS
2017-07-31 12:59:32 -04:00
Harshavardhana
489602efe5 Allow regions to be set and honored for S3 driver. (#7010)
This is necessary for certain users where
GetBucketLocation API is disabled using IAM
policies. There is a field AmazonS3Region
which we need to re-purpose and use to support
this properly.

Fixes https://github.com/mattermost/platform/issues/6999
2017-07-31 12:22:52 -04:00
Chris
e5e450fc09 fix dm custom slash command regression (#7008) 2017-07-25 11:36:14 -07:00
George Goldberg
6c6f2a1138 PLT-6595-Server: Job Management APIs. (#6931)
* PLT-6595-Server: Job Management APIs.

* MANAGE_JOBS Permission

* Fix test.
2017-07-20 08:25:35 -07:00
Harrison Healey
59e4ecd09f PLT-6760 Allowed TestUploadFile to pass when http client errors (#6985) 2017-07-20 09:42:52 +01:00
George Goldberg
fe368a7456 PLT-6595: API to purge Elasticsearch indexes. (#6971) 2017-07-19 09:43:05 +01:00
Christopher Speller
97f34e483b Merge branch 'release-4.0' 2017-07-18 15:45:23 -07:00
Saturnino Abril
21a3219b9b [PLT-6676] Make OutgoingWebhook to fire when post has no text content but only attachment (#6935)
* make OutgoingWebhook to fire when post has no text content but only attachment

* update per comment and modify payload & test
2017-07-18 15:43:31 -04:00
Harrison Healey
9a23519d07 PLT-6983 Allowed team invite IDs of arbitrary lengths to match API v3 (#6944) 2017-07-15 05:06:59 +08:00
Harrison Healey
a20ddb4047 Fixed downloading of image files (#6934)
* Fixed downloading of image files

* Fixed captitalization

* Fixed missing import

* Rename image to media
2017-07-15 02:42:08 +08:00
George Goldberg
2bf64b54c2 PLT-7025: Fix Slack Import API. (#6905) 2017-07-12 22:13:25 +09:00
Joram Wilander
f3acd34128 Redirect OAuth SSO errors to error page (#6898) 2017-07-11 02:52:59 +08:00
Joram Wilander
2bfd7be8d1 Minor status updates (#6889) 2017-07-11 02:49:42 +08:00
Christopher Speller
e5912d4f95 Fixing error in apiv4 flagged posts route (#6880) 2017-07-09 06:51:55 +08:00
George Goldberg
39b071bc0e Add optional config parameter to test elasticsearch endpoint. (#6877) 2017-07-07 12:12:14 -04:00
George Goldberg
0495a51949 PLT-6916: Redesign the jobs package and Jobserver. (#6733)
This commit redesigns the jobserver to be based around an architecture
of "workers", which carry out jobs of a particular type, and "jobs"
which are a unit of work carried by a particular worker. It also
introduces "schedulers" which are responsible for scheduling jobs of a
particular type automatically (jobs can also be scheduled manually when
apropriate).

Workers may be run many times, either in instances of the platform
binary, or the standalone jobserver binary. In any mattermost cluster,
only one instance of platform OR jobserver must run the schedulers. At
the moment this is controlled by a config variable, but in future will
be controlled through the cluster leader election process.
2017-07-07 15:21:02 +01:00
JoramWilander
15ad24d160 Minor fix 2017-07-06 17:28:38 -04:00
Saturnino Abril
8f8a978e84 [PLT-6838] Restrict channel delete option per permission policy even for last channel member (#6706)
* channel delete option is hidden from the menu unless there is appropriate permissions as set in the policy page

* apply to public channel only and add restriction to API layer

* updated channel deletion
2017-07-05 06:32:27 +08:00
Joram Wilander
f54aee1ef5 Add paging to the GET /emojis endpoint (#6802) 2017-07-03 23:58:02 -07:00
Joram Wilander
5507154992 Add some basic sorting support for GET /users endpoint (#6801) 2017-06-30 12:07:23 -04:00
Saturnino Abril
eea64f8049 [PLT-5864] Move teammate name display setting to the System Console (#6681)
* move teammate name display setting to the system console

* update all the likes of TeammateNameDisplay names

* fix gofmt error

* rebase and fix conflict
2017-06-30 09:06:59 +01:00
George Goldberg
f2898927f1 PLT-6474: Server: Add elasticsearch/test endpoint to API. (#6792) 2017-06-29 17:40:14 -04:00
Jaehyun, Park
50b662040c Add /help slash command (#6650)
* Add /help slash command

* Fix copyright year

* go fmt

* Add help command test at api4

* Fix jasonblais's issue

* Update test code

* Fix unit test issue - keep config unchanged
2017-06-29 10:38:56 -04:00
Pieter Lexis
227586e09a [PLT-5639] Show a message when invited addresses are blocked (#6691)
* Show a message when invited addresses are blocked

When using the "Send Email Invite" functionality. Emails were sent to
domains that were not on the `RestrictCreationToDomains` list. This
would lead to users getting a message that they can't create an account
if they follow the link in the email.

This commit will check the email addresses before the mails are sent and
warn the user typing them in which ones are blocked.

* Add unit test for domain restrictions on invite

* Invite Member: Clear serverError on toggle
2017-06-29 09:04:14 -04:00
Harrison Healey
520cedea16 PLT-6909 Remove deleted emojis from cache (#6757)
* PLT-6909 Remove deleted emojis from cache

* Fixed unit tests
2017-06-29 11:06:45 +08:00
Joram Wilander
7bde11d21b Make sure to log errors when failing to send emails (#6754) 2017-06-28 12:07:52 -04:00
Joram Wilander
e527b6bbe4 PLT-6931 Properly parse request body in post search (#6768)
* Properly parse request body in post search

* Update driver to use correct body
2017-06-28 07:28:17 -07:00